SetLastAccessTime(Path: String; LastAccessTime: DateTime);
Path - a directory which date and time of the last access to it should be changed.
LastAccessTime - date and time that should be set.
The SetLastAccessTime method changes date and time of the last access to a directory.
Sub UserProc(sPath: String);
Begin
If Directory.Exists(sPath) Then
Directory.SetLastAccessTime(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 the last access to it.
See also: