|
|
|
|
|
WLanguage procedure called by zipAddFile WLanguage procedure ("Callback") used by zipAddFile to manage the progress of files being added to the archive. If you use a TAR, gzip or TGZ (TAR.GZ) archive, the progress is refreshed only after the file is added.
GLOBAL
ArchiveName is string = "MyArchive"
FileName is string
CreationErrorCode is int
AdditionErrorCode is int
EventNum is int
CreationErrorCode = zipCreate(ArchiveName, "C:\MyDirectory\MyArchives\PdfArchive.wdz")
IF CreationErrorCode = 0 THEN
FileName = fSelect("", "", "File to add", ...
"File to compress" + TAB + "*.*", "*", fselOpen + fselExist)
AdditionErrorCode = zipAddFile(ArchiveName, FileName, zipNone, Compression_ProgressBar)
IF AdditionErrorCode <> 0 THEN
Error(zipMsgError(AdditionErrorCode))
END
ELSE
Error(zipMsgError(CreationErrorCode))
END
INTERNAL PROCEDURE Compression_ProgressBar(CurrentFile is string, Percentage is int)
IF Percentage < 100 THEN
ProgressBar(Percentage, 100, CurrentFile)
Multitask(-1)
ELSE
ProgressBar()
END
END
Syntax
zipAddFile_Callback(<Current file> , <Progress percentage>)
<Current file>: Character string Name of the file being processed. <Progress percentage>: Integer Progress percentage of the file being added to the archive.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|