| [Overview][Constants][Types][Procedures and functions][Variables][Index] |
Sets the last modification time for the file
Source position: lazfileutils.pas line 113
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 enviroment, a handle is created for the specified file name, and SetFileTime is called to store the updated file age. For UNIX-like enviroments, 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.
| lazarus-ccr.sourceforge.net |