PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK

  • Modifying the date and time associated with a file
  • Managing the seconds
  • Managing errors
  • Operating mode in the different operating systems
  • Creation time, modification time or access time
  • Equivalence
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns or modifies the different times associated with a file or with a directory (creation, modification or access).
Windows Mobile In this version, you cannot modify the time associated with a directory on Pocket PC.
Versions 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Windows Mobile
// Retrieve the creation time of a file
ResTime = fTime("\MyDirectories\File.txt", "", fCreation)
Syntax
<Result> = fTime(<File or directory path> [, <New time> [, <Type of time>]])
<Result>: Character string
  • Time associated with the file or directory (in HHMMSS format),
  • Empty string ("") if an error occurred. To find out the error details, use ErrorInfo associated with the errMessage constant.
<File or directory path>: Character string (with quotes)
  • Name and full (or relative) path of file (up to 260 characters).
  • Full (or relative) path of directory (up to 260 characters).
A UNC path can be used. If this parameter corresponds to a directory name, this name may (or may not) end with "\".
Versions 15 and later
AndroidAndroid Widget This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories, as well as onto the external memory (SDCard).
New in version 15
AndroidAndroid Widget This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories, as well as onto the external memory (SDCard).
AndroidAndroid Widget This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: In Android, the file system is read-only on the device and on the emulator. An application has the rights to write into its setup directory or into one of its subdirectories, as well as onto the external memory (SDCard).
Windows Mobile This path must be a full path or a UNC path. It cannot be a relative path.
Versions 17 and later
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its subdirectories.
New in version 17
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its subdirectories.
iPhone/iPad This parameter can correspond to a full path or to a relative path in relation to the current directory (returned by fCurrentDir). This parameter is case sensitive.
Reminder: On iPhone/iPad, an application has the rights to write into its setup directory or into one of its subdirectories.
<New time>: Optional character string (with quotes)
  • Modifying a time: new time associated with the specified file or directory (in HHMMSS format),
  • Reading a time: empty string ("").
Windows Mobile Only the time associated with a file can be modified. This parameter is ignored for a directory.
<Type of time>: Optional constant
Indicates the time to use:
fAccessTime of last access to the file or directory.
AndroidAndroid Widget This constant is not available.
fCreationTime of file/directory creation.
AndroidAndroid Widget This constant is not available.
fModify
(Default value)
Time of last modification made to the file or directory.
Remarks
AndroidAndroid Widget Windows MobileStored procedures

Modifying the date and time associated with a file

To modify the date and time associated with a file, you have the ability to use fDateTime.
Remark: You also have the ability to use fDate and fTime successively. However, fDateTime is faster.

Managing the seconds

All the methods for disk formatting (FAT, NTSF, ...) are not precise to the second. Depending on the method used, fTime may round the time passed in parameter.
For example, for a FAT drive, the time for file access has a precision of one day. Therefore, the access time is "000000" and it cannot be modified.

Managing errors

fTime generates an error in the following cases:
  • the specified file is opened or locked by another application,
  • the specified file does not exist,
  • the name of the specified file is invalid,
  • the format of <New time> is incorrect. A WLanguage error occurs if the format of <New time> is incorrect.
  • a Unicode string was used for <Path of file or directory> in an operating system such as Windows 98 or Windows Me.

Operating mode in the different operating systems

  • The time associated with a file or a directory cannot be modified in the following systems: Windows 98, Windows ME.
  • Windows Mobile The different times associated with a directory cannot be modified on a Pocket PC.
Windows Mobile

Creation time, modification time or access time

In most cases, the creation time, the modification time and the access time are identical.
Windows Mobile

Equivalence

The operating mode of fTime is equivalent to the operating mode of ceFileTime.
The only difference is:
  • fTime handles a file or a directory found on the Pocket PC from a WINDEV Mobile application.
  • ceFileTime handles a file or a directory found on the Pocket PC from a standard WINDEV application.
Component : wd240std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment