file_date (STRING* name)

Returns the last modification time of a file. The file will be searched first in the save_dir folder, then in the work folder. A7.82  LC 


name - name of the file,STRING* or char*.


long - last modification timestamp (number of seconds since January 1, 1970), or 0 if the file was not found.




// copies a file only when the target file exists and the source file is newer
var file_refresh(STRING* to,STRING* from)
   long date_to = file_date(to);
   if (!to) return 0; // target file does not exist
   long date_from = file_date(from);
   if (date_from <= date_to) return 0; // source file is not newer
   return file_cpy(to,from);

See also:

file_cpy, file_rename, file_delete

► latest version online