SetCreationTime(Path: String; CreationTime: DateTime);
Path - a directory which date and time of creation should 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.
Sub UserProc(sPath: String);
Begin
If Directory.Exists(sPath) Then
Directory.SetCreationTime(sPath, DateTime.Now);
End If;
End Sub UserProc;
While executing this example it is checked whether directory, specified in the parameter sPath, is present in file system. If a directory exists, current date and time are set as date and time of its creation.
See also: