ShellBrowser Delphi Components Documentation
|
Appends a file or folder to a ZIP file.
class procedure Zip(const pFileName: IItemIdList; const pZipFile: IItemIdList); overload; static;
Parameters |
Description |
const pFileName: IItemIdList |
Files that should be appended to a ZIP file. |
const pZipFile: IItemIdList |
The ZIP file (must be a filesystem path). |
IMPORTANT: The operation is performed on a background thread!
Exceptions |
Description |
if pFileName or pZipFile are invalid or if any COM exception occured. |
The following example shows how to append a folder to a ZIP file:
var Folder, ZipFile: IItemIdList; begin Folder := TJamItemIdList.Create('C:UsersPublic'); ZipFile := TJamItemIdList.Create('C:Zipfile.zip'); TJamFileOperation.Zip(Folder, ZipFile); end;