IFile.GetLastWriteTime

Syntax

GetLastWriteTime(FileName: String): DateTime;

Parameters

FileName — a path and name of a file, which date and time of the last change should be found out.

Description

The GetLastWriteTime method returns date and time of the last edit of a file.

Example

Sub Main;

Var

d: DateTime;

Begin

If File.Exists("c:\New_folder\1.txt") Then

d:=File.GetLastWriteTime("c:\New_folder\1.txt");

End If;

End Sub Main;

After executing this example, variable "d" contains date and time of the last change of a file 1.txt if it exists.

See also:

IFile