Files.GetDateTime |
Top Previous Next |
Syntax function Files.GetDateTime(FileName: string): datetime
Alternative Names
Description Returns the timestamp of the file identified by FileName. If an error occurs, NULL is returned and you can use Shell.GetLastError or Shell.GetLastErrorMessage for more information.
See also
Example execute udsblock as declare variable dt timestamp; begin /* change to a file you want to check */ fn = 'c:\pagefile.sys';
dt = Files.GetDateTime(fn); GUI.ShowMessage('Last change to this file: ' || dt);
/* this will fail if the file is still "pagefile.sys" */ errcode = Files.SetDateTime(fn, Util.Now());
if errcode <> 0 then GUI.ShowMessage(Shell.GetLastErrorMessage());
dt = Files.GetDateTime(fn); GUI.ShowMessage('Last change to this file: ' || dt); end |