[Overview][Constants][Types][Classes][Procedures and functions][Variables] |
Return the file time of an opened file.
Source position: filutilh.inc line 89
function FileGetDate( |
Handle: THandle |
):LongInt; |
FileGetdatereturns the filetime of the opened file with filehandle Handle. It is the same as FileAge, with this difference that FileAgeonly needs the file name, while FilegetDateneeds an open file handle.
On error, -1 is returned.
|
Return the timestamp of a file. |
Program Example39; { This program demonstrates the FileGetDate function } Uses sysutils; Var F,D : Longint; Begin F:=FileCreate('test.dat'); D:=FileGetDate(F); Writeln ('File created on ',DateTimeToStr(FileDateToDateTime(D))); FileClose(F); DeleteFile('test.dat'); End.