RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.FileGetDate Function

Returns an OS timestamp for a specified file.

Pascal
function FileGetDate(Handle: Integer): Integer;
C++
int FileGetDate(int Handle);

SysUtils

Use FileGetDate to determine the timestamp of a file given its handle. The return value is -1 if the handle is invalid. The FileDateToDateTime function can be used to convert the returned value to a TDateTime value.

Note: :FileGetDate uses a file handle rather than a native Delphi file variable. To obtain the timestamp of a file that has not been opened using the FileOpen or FileCreate method, use the FileAge function instead.
Note: :Under Linux, -1 is a valid timestamp. Use FileExists to verify that the file does not exist.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!