SetLastWriteTime(Path: String; LastWriteTime: DateTime);
Path - directory, which date and time of the last contents change, must be set.
LastWriteTime - date and time that must be set.
The SetLastWriteTime method determines date and time of the last edit of a directory contents.
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: