658 |
|
|
659 |
|
|
660 |
/** |
/** |
|
* Get a files last modified timestamp. This function returns the max |
|
|
* of either st_mtime or st_ctime. If the file does not exist or is |
|
|
* not a regular file FALSE is returned |
|
|
* @param file A file to stat |
|
|
* @return last modification time or FALSE if not found or not a regular file |
|
|
*/ |
|
|
time_t file_changedtime(char *file) { |
|
|
|
|
|
struct stat buf; |
|
|
|
|
|
if(!stat(file, &buf)) |
|
|
if(S_ISREG(buf.st_mode)) |
|
|
return MAX(buf.st_mtime, buf.st_ctime); |
|
|
|
|
|
return FALSE; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
661 |
* Returns a (RFC1123) Date string. If the given date |
* Returns a (RFC1123) Date string. If the given date |
662 |
* is NULL compute the date now. |
* is NULL compute the date now. |
663 |
* @param date |
* @param date |