Get file last modified timestamp


/ Published in: Delphi
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.