| [Overview][Constants][Types][Procedures and functions][Variables][Index] |
Returns the last modification time for the file in FileDate format
Source position: lazfileutils.pas line 107
function FileAgeUTF8( |
const FileName: string |
):LongInt; |
FileName |
|
File name for the function |
Last modification time for the file in FileDate format
FileAgeUTF8 is a Longint function which returns the last modification time for the file in FileName. FileAgeUTF8 cannot be used on directories, and returns -1 if FileName indicates a directory.
For UNIX-like environments, the return value is provided by the FileAge function in SysUtils. For the Windows environment, FindFirstFileW is used to get TWin32TWin32FindDataW data for the specified file. Its ftLastWriteTime value is converted using WinToDosTime to get the return value for the function.
The return value is in FIleDate format, and can be transformed to TDateTime format with the FileDateToDateTime function.
| lazarus-ccr.sourceforge.net |