IDirectory.SetLastAccessTime

Syntax

SetLastAccessTime(Path: String; LastAccessTime: DateTime);

Parameters

Path - directory, which date and time of the last access to it must be changed.

LastAccessTime - date and time that must be set.

Description

The SetLastAccessTime method changes date and time of the last access to a directory.

Example

Sub UserProc(sPath: String);
Begin
    If Directory.Exists(sPath) Then
        Directory.SetLastAccessTime(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 the last access to it.

See also:

IDirectory