[Overview][Constants][Types][Procedures and functions][Variables][Index] |
Sets the last modification time for the file.
Source position: lazfileutils.pas line 117
function FileSetDateUTF8( |
const FileName: string; |
Age: LongInt |
):LongInt; |
FileName |
|
File name to update in the function. |
Age |
|
New value for the last modification time. |
Last error number in the function.
FileSetDateUTF8 is a Longint function used to set the last modification time for the file to the specified Age in FileDate format. Use DateTimeToFileDate to convert a TDateTime value to FileDate format.
For the Windows environment, a handle is created for the specified file name, and SetFileTime is called to store the updated file age. For UNIX-like environments, FileSetDate in SysUtils is called to set the file age. InvalidateFileStateCache is also called for the specified file name.
The return value is the value from GetLastError; a non-zero value indicates that an error has occurred.
Version 3.2 | Generated 2024-02-25 | Home |