Posted By

icebob on 08/02/10


Tagged

date file


Versions (?)

Get file last modified timestamp


 / Published in: Delphi
 

  1. function GetFileLastModDate(filename: string): TDateTime;
  2. var
  3. fileDate: integer;
  4. begin
  5. Result := 0;
  6. fileDate := FileAge(filename);
  7.  
  8. // Did we get the file age OK?
  9. if fileDate > -1 then
  10. Result := FileDateToDateTime(fileDate);
  11. end;

Report this snippet  

You need to login to post a comment.