System.IOUtils.TFile.SetCreationTimeUtc
Delphi
class procedure SetCreationTimeUtc(const Path: string; const CreationTime: TDateTime); inline; static;
C++
static void __fastcall SetCreationTimeUtc(const System::UnicodeString Path, const System::TDateTime CreationTime);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | System.IOUtils.pas System.IOUtils.hpp |
System.IOUtils | TFile |
Description
Changes the creation time of a file.
Use SetCreationTimeUtc to change the creation time of a file. The new date-time value is considered to be in the UTC (Coordinated Universal Time) time zone.
The following table lists the parameters expected by this method:
Name | Meaning |
---|---|
Path |
Path of the file for which the creation time is changed. |
CreationTime |
The new creation time that will be applied to the file. |
On POSIX and Mac, SetCreationTimeUtc will only update the last accessed time, because a Creation Time for a file system entry is not defined.
Note: SetCreationTimeUtc raises an exception if the given path is invalid or the file does not exist.