help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

FileAge

Return the timestamp of a file.

Declaration

Source position: filutilh.inc line 83

function FileAge(

  const FileName: String

):LongInt;

Description

FileAge returns the last modification time of file FileName. The FileDate format can be transformed to TDateTime format with the FileDateToDateTime function.

Errors

In case of errors, -1 is returned.

See also

FileDateToDateTime

  

Convert a FileDate value to a TDateTime value.

FileExists

  

Check whether a file exists in the filesystem.

FileGetAttr

  

Return attributes of a file.

Example

Program Example36;

{ This program demonstrates the FileAge function }

Uses sysutils;

Var S : TDateTime;
    fa : Longint;
Begin
  fa:=FileAge('ex36.pp');
  If Fa<>-1 then
    begin
    S:=FileDateTodateTime(fa);
    Writeln ('I''m from ',DateTimeToStr(S))
    end;
End.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505