IDirectory.SetLastWriteTime

Syntax

SetLastWriteTime(Path: String; LastWriteTime: DateTime);

Parameters

Path - a directory, which date and time of the last content change, should be set.

LastWriteTime - date and time that should be set.

Description

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

Example

Sub UserProc(sPath: String);
Begin
    If Directory.Exists(sPath) Then
        Directory.SetLastWriteTime(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 last content change.

See also:

IDirectory