TUnZipper
Extracts and decompresses files and directories in a .ZIP archive file.
Declaration
Source position: zipper.pp line 535
type
TUnZipper = class(TObject)
public
constructor Create;
destructor Destroy;
procedure UnZipOneFile;
procedure UnZipAllFiles;
procedure UnZipAllFiles(const AZipFileName: RawByteString);
procedure UnZipFile(const aExtractFileName: RawByteString);
procedure UnZipFile(const AZipFileName: RawByteString;
const aExtractFileName: RawByteString);
procedure UnZipFiles(const AZipFileName: RawByteString;
FileList: TStrings);
procedure UnZipFiles(const AZipFileName: RawByteString;
aFileList: Array of RawBytestring);
procedure UnZipFiles(aFileList: TStrings);
class procedure Unzip(const AZipFileName: RawByteString);
class procedure Unzip(const AZipFileName: RawByteString;
aExtractFileName: RawByteString);
class procedure UnZip(const AZipFileName: RawByteString;
const aExtractFileName: RawByteString;
aOutputFileName: AnsiString);
class procedure Unzip(const AZipFileName: RawByteString;
aFileList: Array of RawByteString);
class procedure Unzip(const AZipFileName: RawByteString;
aFileList: TStrings);
class procedure Unzip(const AZipFileName: RawByteString;
aFileList: Array of RawByteString;
aOutputDir: RawByteString; aFlat: Boolean=False);
class procedure Unzip(const AZipFileName: RawByteString;
aFileList: TStrings; aOutputDir: RawByteString;
aFlat: Boolean=False);
procedure Clear;
procedure Examine;
procedure Terminate;
property BufferSize: LongWord; {rw}
property OnOpenInputStream: TCustomInputStreamEvent; {rw}
property OnCloseInputStream: TCustomInputStreamEvent; {rw}
property OnCreateStream: TOnCustomStreamEvent; {rw}
property OnDoneStream: TOnCustomStreamEvent; {rw}
property OnPercent: Integer; {rw}
property OnProgress: TProgressEvent; {rw}
property OnProgressEx: TProgressEventEx; {rw}
property OnStartFile: TOnStartFileEvent; {rw}
property OnEndFile: TOnEndOfFileEvent; {rw}
property FileName: RawByteString; {rw}
property OutputPath: RawByteString; {rw}
property FileComment: AnsiString; {r}
property Files: TStrings; {r}
property Entries: TFullZipFileEntries; {r}
property UseUTF8: Boolean; {rw}
property Flat: Boolean; {rw}
property ConvertBackslashes: Boolean; {rw}
property Terminated: Boolean; {r}
end;
Properties
| Member |
Visibility |
Description |
| BufferSize |
public |
Size of the buffer used to read and decompress entries in the .ZIP file. |
| ConvertBackslashes |
public |
|
| Entries read only |
public |
Collection with TFullZipFileEntry instances for files and directories stored in the .ZIP archive. |
| FileComment read only |
public |
Comment stored in the .ZIP archive file. |
| FileName |
public |
Path and file name for the .zip file to be unzipped / processed. |
| Files read only |
public |
Files in the zip file (deprecated). |
| Flat |
public |
Extracts files to a single directory. |
| OutputPath |
public |
Path where archive files will be unzipped. |
| Terminated read only |
public |
True if the Terminate method has been called. |
| UseUTF8 |
public |
Indicates that the UTF-8-encoded names are used when locating and unzipping entries in the archive. |
See all PropertiesMethods
| Member |
Visibility |
Description |
| Clear |
public |
Removes all entries and files from object. |
| Create |
public |
Constructor for the class instance. |
| Destroy |
public |
Destructor for the class instance. |
| Examine |
public |
Opens zip file and reads the directory entries (list of zipped files). |
| Terminate |
public |
Sets the value in Terminated to True. |
| Unzip |
public |
Unzips the specified .ZIP archive file. |
| UnZipAllFiles |
public |
Unzips all files in a zip file, writing them to disk. |
| UnZipFile |
public |
Unzips a single file found in the specified .ZIP archive. |
| UnZipFiles |
public |
Unzips the specified files in a .ZIP archive file. |
| UnZipOneFile |
public |
|
See all MethodsEvents
| Member |
Visibility |
Description |
| OnCloseInputStream |
public |
Event handler signalled when the input stream for the .ZIP file is closed. |
| OnCreateStream |
public |
Event handler signalled when an output stream is created. |
| OnDoneStream |
public |
Event handler signalled when an output stream is closed. |
| OnEndFile |
public |
Callback procedure that will be called after unzipping a file. |
| OnOpenInputStream |
public |
Event handler signalled when the input stream for the .ZIP file is opened. |
| OnPercent |
public |
Threshold percentage which triggers a progress notification. |
| OnProgress |
public |
Progress event handler used when decompressing files. |
| OnProgressEx |
public |
Extended progress event handler used when decompressing files. |
| OnStartFile |
public |
Callback procedure that will be called before unzipping a file. |
See all Events