System.SysUtils.FileSetDate

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function FileSetDate(const FileName: string; Age: LongInt): Integer;
function FileSetDate(Handle: THandle; Age: Integer): Integer;

C++

extern DELPHI_PACKAGE int __fastcall FileSetDate(const System::UnicodeString FileName, int Age)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

Sets the OS time stamp for a specified file.

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

FileName is the name of the file to alter.

Age is the time stamp to apply to the specified file.

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

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

Note: If the FileName parameter is a symbolic link, the method is performed on the target file.

See Also


Code Examples