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



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

FileGetDate

Return the file time of an opened file.

Declaration

Source position: filutilh.inc line 89

function FileGetDate(

  Handle: THandle

):LongInt;

Description

FileGetdate returns the filetime of the opened file with filehandle Handle. It is the same as FileAge, with this difference that FileAge only needs the file name, while FilegetDate needs an open file handle.

Errors

On error, -1 is returned.

See also

FileAge

  

Return the timestamp of a file.

Example

Program Example39;

{ This program demonstrates the FileGetDate function }

Uses sysutils;

Var F,D : Longint;

Begin
  F:=FileCreate('test.dat');
  D:=FileGetDate(F);
  Writeln ('File created on ',DateTimeToStr(FileDateToDateTime(D)));
  FileClose(F);
  DeleteFile('test.dat');
End.

Notes

 No notes exist for this page yet. 





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