SetCreationTime(Path: String; CreationTime: DateTime);
Path. Directory, which date and time of creation must be changed.
CreationTime. Date and time that should be set.
The SetCreationTime method changes date and time of creation of a directory passed by the Path parameter.
The method is supported only in Windows.
To execute the example, add a link to the IO system assembly.
Sub UserProc(sPath: String);
Begin
If Directory.Exists(sPath) Then
Directory.SetCreationTime(sPath, DateTime.Now);
End If;
End Sub UserProc;
After executing the example it is checked if the directory specified in the sPath parameter is present in the file system. If the directory exists, the current date and time are set as date and time of its creation.
See also: