AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de archivos externos
  • Example: Retrieving the different times associated with a file
  • Example: Modifying the time of file creation
  • Example: Retrieving the different times associated with a file (WEBDEV)
  • Example: Modifying the modification time of a file (WEBDEV)
Example: Retrieving the different times associated with a file
Example: Modifying the time of file creation
Example: Retrieving the different times associated with a file (WEBDEV)
WEBDEV - Código ServidorPHPAjax The following code is used to find out the modification time and the access time associated with a file.
// Declare the variables
ResModificationTime is string
ResAccessTime is string
FilePath is string
 
// Select a file
FilePath = "C:\MyDirectories\File.txt"
// Retrieve the file time information
ResModificationTime = fTime(FilePath, "", fModify)
ResAccessTime = fTime(FilePath, "", fAccess)
IF ResModificationTime <> "" AND ResAccessTime <> "" THEN
// Display the different times associated with the file
Info("The modification time is: " + ResModificationTime + CR + ...
"The access time is: " + ResAccessTime)
ELSE
// Display an error message if the retrieval was not performed
Error(ErrorInfo(errMessage))
END
Example: Modifying the modification time of a file (WEBDEV)
WEBDEV - Código ServidorPHPAjax The following code is used to replace the modification time of a file by the system time of the current computer.
// Declare the variables
ResModificationTime is string
ResSystemTime is string
FilePath is string
 
// Select a file
FilePath = "C:\MyDirectories\File.txt"
 
// Retrieve the system time in HHMMSSCC format
ResSystemTime = TimeSys()
 
// Extract the system time in HHMMSS format
ResSystemTime = Left(ResSystemTime, 6)
 
// Change the modification time of the selected file
ResModificationTime = fTime(FilePath, ResSystemTime, fModify)
IF ResModificationDate <> "" THEN
// Display the modification time of the file
Info("The modification time is now: " + ResModificationTime)
ELSE
// Display an error message if the retrieval was not performed
Error(ErrorInfo(errMessage))
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: 23/08/2022

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