AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de archivos / Procedimiento WLanguage
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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.
Ejemplo
// 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
	AddErrorCode = 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 PROCEDURE zipAddDirectory_Callback(FileName is string)
	IF fExtractPath(FileName, fExtension) ~= ".gif" THEN
		RETURN True
	ELSE
		RETURN False
	END
END
Sintaxis
<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.
Versión mínima requerida
  • Versión 26
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 28/03/2025

Señalar un error o enviar una sugerencia | Ayuda local