TVCLUnZip控件使用
#include <vcl.h>
#include "VCLUnZip.hpp"
#include "kpZipObj.hpp"
#pragma hdrstop
//---------------------------------------------------------------------------
#pragma argsused
#pragma link "VCLUnZip"
int main(int argc, char* argv[])
{
TVCLUnZip* Zipper = new TVCLUnZip(Application);
Zipper->ZipName = "c:\test\Zipfile.zip"; // set the zip filename
Zipper->ReadZip(); // open it and read its information
// List filenames in zip file
// determine which files to unzip
Zipper->FilesList->Add("*.*"); // unzip all .cpp files
Zipper->DoAll = True; // Don't unzip all files
Zipper->DestDir = "c:\mydir"; // Set destination directory
Zipper->RecreateDirs = true; // don't recreate directory structures
Zipper->RetainAttributes = True; // Set attributes to original after unzipping
int NumUnzipped = Zipper->UnZip(); // Extract files, return value is the number of files actually unzipped
delete Zipper;
return 0;
}
#include "VCLUnZip.hpp"
#include "kpZipObj.hpp"
#pragma hdrstop
//---------------------------------------------------------------------------
#pragma argsused
#pragma link "VCLUnZip"
int main(int argc, char* argv[])
{
TVCLUnZip* Zipper = new TVCLUnZip(Application);
Zipper->ZipName = "c:\test\Zipfile.zip"; // set the zip filename
Zipper->ReadZip(); // open it and read its information
// List filenames in zip file
// determine which files to unzip
Zipper->FilesList->Add("*.*"); // unzip all .cpp files
Zipper->DoAll = True; // Don't unzip all files
Zipper->DestDir = "c:\mydir"; // Set destination directory
Zipper->RecreateDirs = true; // don't recreate directory structures
Zipper->RetainAttributes = True; // Set attributes to original after unzipping
int NumUnzipped = Zipper->UnZip(); // Extract files, return value is the number of files actually unzipped
delete Zipper;
return 0;
}
浙公网安备 33010602011771号