RAD Studio VCL Reference
SysUtils.FileGetDate Function

Returns an OS timestamp for a specified file.

function FileGetDate(Handle: Integer): Integer;
int FileGetDate(int Handle);

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) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!