| iMatix home page | << | < | > | >> |
SFL Version 2.11 |
#include "sflfile.h" Bool file_has_changed ( const char *filename, long old_date, long old_time)
Returns TRUE if the file has changed since it was last read. The calling program must supply the date and time of the file as it was read. If the file is not present or accessible, returns FALSE.
{ long file_date, /* Timestamp of file */ file_time; /* Datestamp of file */ ASSERT (filename); if (!file exists (filename)) /* Not found - nothing more to do */ return (FALSE); file_time = timer to time (get file time (filename)); file_date = timer to date (get file time (filename)); if (file_date > old_date || (file_date == old_date && file_time > old_time)) return (TRUE); else return (FALSE); }
| << | < | > | >> | Copyright © 1996-2000 iMatix Corporation |