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
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
WLanguage Procedure llamado por zipAddFile
WLanguage Procedure ("Callback") utilizado por zipAddFile para gestionar el progreso de los ficheros que se añaden al archivo.
Si utiliza un archivo TAR o TGZ (TAR.GZ), el progreso se actualiza sólo después de añadir el archivo.
Ejemplo
// -- Initialization code of window
GLOBAL
ArchiveName is string = "MyArchive"
 
// -- Click code on BTN_AddFile
// Initialization code
FileName is string
CreationErrorCode is int
AdditionErrorCode is int
EventNum 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 file to add
FileName = fSelect("", "", "File to add", ...
   "File to compress" + TAB + "*.*", "*", fselOpen + fselExist)
// Add the selected file to the archive
AdditionErrorCode = zipAddFile(ArchiveName, FileName, zipNone, Compression_ProgressBar)
// Display an error message if the file was not added
IF AdditionErrorCode <> 0 THEN
Error(zipMsgError(AdditionErrorCode))
END
ELSE
Error(zipMsgError(CreationErrorCode))
END
 
 
// Internal procedure used for the progress bar.
INTERNAL PROCEDURE Compression_ProgressBar(CurrentFile is string, Percentage is int)
IF Percentage < 100 THEN
ProgressBar(Percentage, 100, CurrentFile)
// Refresh the window
Multitask(-1)
ELSE
// The compression is over
ProgressBar()
END
END
Sintaxis
zipAddFile_Callback(<Current file> , <Progress percentage>)
<Current file>: Cadena de caracteres
Nombre del archivo que se está procesando.
<Progress percentage>: Integro
Porcentaje de progreso del archivo que se está añadiendo al archivo.
Componente: wd290zip.dll
Ver también
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 27/05/2022

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