GetLastAccessTime(FileName: String): DateTime;
FileName — path and name of the file, which date and time of the last access must be found out.
The GetLastAccessTime method returns date and time of the last access to a file.
Sub Main;
Var
d: DateTime;
Begin
If File.Exists("c:\New_folder\1.txt") Then
d:=File.GetLastAccessTime("c:\New_folder\1.txt");
End If;
End Sub Main;
After executing the example, the "d" variable contains date and time of the last access to the 1.txt file if it exists.
See also: