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