RAD Studio VCL Reference
SysUtils.FileSetDate Function

Sets the OS time stamp for a specified file.

function FileSetDate(const FileName: string; Age: Integer): Integer; overload;
function FileSetDate(Handle: Integer; Age: Integer): Integer; overload; platform;
int FileSetDate(const AnsiString FileName, int Age);
int FileSetDate(int Handle, int Age);

FileSetDate sets the OS timestamp of the specified file to the value given by Age. The DateTimeToFileDate function can be used to convert a TDateTime value to a OS timestamp.  

Handle is the Windows file handle of the file to alter. This syntax is only available on Windows. 

FileName is the name of the file to alter. 

Age is the timestamp to apply to the specified file. 

The return value is zero if the function was successful. Otherwise the return value is an error code. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!