ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Archive functions / WLanguage procedure
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
WLanguage procedure called by zipAddDirectory to handle the progress bar
WLanguage procedure ("Callback") used by zipAddDirectory to manage the progress of files being added to the archive.
Example
// -- Déclarations globales de la fenêtre
GLOBAL
NomArchive is string = "MonArchive"
// -- Clic sur BTN_AjoutRépertoire
// Initialisation des variables
NomRépertoire is string
CodeErreurCréation is int
CodeErreurAjout is int

// Création d'une archive
CodeErreurCréation = zipCreate(NomArchive, "C:\MonRépertoire\MesArchives\ArchivePdf.wdz")

// Affichage du message d'erreur si l'archive n'a pas été créée
IF CodeErreurCréation = 0 THEN
	// Sélection du répertoire
	NomRépertoire = fSelectDir("", "", "Répertoire à ajouter")
	// Ajoute la totalité des fichiers du répertoire sélectionné dans l'archive
	CodeErreurAjout = zipAddDirectory(NomArchive, NomRépertoire, False, "", zipDirectory, ...
			zipAjouteRépertoireJauge_Callback)
	// Affichage du message d'erreur si le fichier n'a pas été ajouté
	IF CodeErreurAjout <> 0 THEN
		Error(zipMsgError(CodeErreurAjout))
	END
ELSE
	Error(zipMsgError(CodeErreurCréation))
END
// Cette procédure permet de gérer la jauge.
INTERNAL PROCEDURE zipAjouteRépertoireJauge_Callback(FichierEnCours is string, 
	AvancementGlobal is int, AvancementFichier is int)
	IF AvancementGlobal < 100 THEN
		ProgressBar(AvancementGlobal, 100, FichierEnCours)
		// Rafraîchissement de la fenêtre
		Multitask(-1)

	ELSE
		ProgressBar()
	END
END
Syntax
zipAddDirectory_ProgressBarCallBack(<Current file> , <Overall progress percentage> , <File progress percentage>)
<Current file>: Character string
Name of the file being processed.
<Overall progress percentage>: Integer
Progress percentage of the files added to the archive.
<File progress percentage>: Integer
Progress percentage of the file being added to the archive.
Remarks
If you are using a 7z archive, only <Overall progress percentage> is specified. <File progress percentage> will have the same value.
Business / UI classification: Neutral code
Component: wd300java zip.dll
Minimum version required
  • Version 26
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/28/2025

Send a report | Local help