AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de archivos externos
  • Finding out the size of a file
  • Finding out the size of a file (WEBDEV)
Finding out the size of a file
WINDEVReportes y ConsultasJavaCódigo de Usuario (UMC) The following code is used to find out the size of a file. The file name and path are selected by fSelect.
// Declare the variables
FilePath is string
ResSize is int
// Select a file
FilePath = fSelect("", "", "Selecting a file", ...
"All files (*.*)" + TAB + "*.*", "", fselOpen + fselExist)
// Retrieve the file size
ResSize = fSize(FilePath)
// Display an error message if the retrieval was not performed
IF ResSize = -1 THEN
Error(ErrorInfo(errMessage))
ELSE
  // Display the file size
  Info("Size of file: " + ResSize + " bytes")
END
Finding out the size of a file (WEBDEV)
WEBDEV - Código ServidorPHPAjax The following code is used to find out the size of a file.
// Declare the variables
FilePath is string
ResSize is int
// Select a file
FilePath = "C:\MyDirectories\File.doc"
// Retrieve the file size
ResSize = fSize(FilePath)
// Display an error message if the retrieval was not performed
IF ResSize = -1 THEN
Error(ErrorInfo(errMessage))
ELSE
// Display the file size
Info("Size of file: " + ResSize + " bytes")
END
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: 22/08/2022

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