Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]

FileSetDate

Set the date of a file.

Declaration

Source position: filutilh.inc line 226

function FileSetDate(

  const FileName: UnicodeString;

  Age: Int64

):LongInt;

function FileSetDate(

  const FileName: UnicodeString;

  const FileDateTime: TDateTime

):LongInt;

function FileSetDate(

  const FileName: RawByteString;

  Age: Int64

):LongInt;

function FileSetDate(

  const FileName: RawByteString;

  const FileDateTime: TDateTime

):LongInt;

function FileSetDate(

  Handle: THandle;

  Age: Int64

):LongInt;

function FileSetDate(

  Handle: THandle;

  const FileDateTime: TDateTime

):LongInt;

Description

FileSetDate sets the file date of the open file with handle Handle or to Age, where Age is a DOS date-and-time stamp value.

Alternatively, the filename may be specified with the FileName argument. This variant of the call is mandatory on Unixes, since there is no OS support for setting a file timestamp based on a handle. (the handle may not be a real file at all).

The function returns zero if successful.

Errors

On Unix, the handle variant always returns -1, since this is impossible to implement. On Windows and DOS, a negative error code is returned.


Documentation generated on: Oct 02 2024