|
|
|
|
WLanguage procedure called by zipAddDirectory WLanguage procedure ("Callback") called when adding files with zipAddDirectory. This procedure allows you to archive a tree structure by excluding one or more files. // Declare and initialize the variables DirectoryName is string ArchiveName is string = "MyArchive" CreationErrorCode is int AdditionErrorCode is int  // Create an archive CreationErrorCode = zipCreate(ArchiveName, "C:\MyDirectory\MyArchives\PdfArchive.wdz")  // Display an error message if the archive was not created IF CreationErrorCode = 0 THEN // Select the directory DirectoryName = fSelectDir("", "", "Directory to add")  // Adds "BMP" files from the selected directory // and subdirectories to the archive AdditionErrorCode = zipAddDirectory(ArchiveName, DirectoryName, True, ...  zipDrive, zipAddDirectory_Callback)  // Display an error message if the files have not been added IF AdditionErrorCode <> 0 THEN  Error(zipMsgError(AdditionErrorCode)) END ELSE Error(zipMsgError(CreationErrorCode)) END  INTERNAL PROCÉDURE zipAddDirectory_Callback(FileName is string) IF fExtractPath(FileName, fExtension) ~= ".gif" THEN RESULT True ELSE RESULT False END END
Syntax
<Result> = zipAddDirectory_Callback(<File name>)
<Result>: Boolean - If the procedure returns True, the file must be included in the archive.
- If the procedure returns False, the file must not be included in the archive.
<File name>: Character string Path of the file that will be processed by zipAddDirectory.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|