IDirectory.SetLastWriteTime

Syntax

SetLastWriteTime(Path: String; LastWriteTime: DateTime);

Parameters

Path - directory, which date and time of the last contents change, must be set.

LastWriteTime - date and time that must be set.

Description

The SetLastWriteTime method determines date and time of the last edit of a directory contents.

Example

Sub UserProc(sPath: String);
Begin
    If Directory.Exists(sPath) Then
        Directory.SetLastWriteTime(sPath, DateTime.Now);
    End If;
End Sub UserProc;

On 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 last contents change.

See also:

IDirectory