IDirectory.SetCreationTime

Syntax

SetCreationTime(Path: String; CreationTime: DateTime);

Parameters

Path. Directory, which date and time of creation must be changed.

CreationTime. Date and time that should be set.

Description

The SetCreationTime method changes date and time of creation of a directory passed by the Path parameter.

Comments

The method is supported only in Windows.

Example

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:

IDirectory