Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Telix/SALT v3.15 & RS-232, Hayes - <b>filetime</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  FILETIME

  .  Summary

  filetime(str <filespec>);

  .  Description

  The filetime function returns the date/time of the specified file.
  <filespec> is the name of the file and may include a drive and di-
  rectory portion, as well as the DOS wildcard characters * and ?.

  The values returned represents the file's modification date as the
  number of seconds since Jan 1, 1970. A date/time in this form can be
  used by the date, time, tyear, tmonth, tday, thour, tmin, tsec, and
  other functions.

  If <filespec> is blank (""), then the date/time of the last file
  found with the filefind function is returned. Note that calling
  filesize or fileattr in the meantime with a non-blank filename would
  instead make this call return the time/date of files found with
  those functions, as they use the same buffer.

  .  Return Value

  An integer value representing the date/time of the indicated file is
  returned, or a value of -1 is returned if the indicated file could
  not be found.

  .  Example

  int time;
  str s[16];

  time = filetime("TELIX.EXE");
  if (time == -1)
   prints("'TELIX.EXE" could not be found!");
  else
   {
    printsc("TELIX.EXE was created at ");
    time(time, s);
    printsc(s);
    printsc(" on ");
    date(time, s);
    printsc(s);
   }

  // this example assumes both files exist
  if (filetime("FILE1") < filetime("FILE2"))
   prints("FILE1 is older than FILE2");
  else
   prints("FILE1 is newer than FILE2");

See Also: filefind filesize fileattr tday thour tmin tmonth tsec tyear date curtime

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson