213 |
return FALSE; |
return FALSE; |
214 |
|
|
215 |
} |
} |
216 |
|
|
217 |
|
|
218 |
|
/** |
219 |
|
* Get a files last modified timestamp. This function returns the max |
220 |
|
* of either st_mtime or st_ctime. If the file does not exist or is |
221 |
|
* not a regular file FALSE is returned |
222 |
|
* @param file A file to stat |
223 |
|
* @return last modification time or FALSE if not found or not a regular file |
224 |
|
*/ |
225 |
|
time_t file_changedtime(char *file) { |
226 |
|
|
227 |
|
struct stat buf; |
228 |
|
|
229 |
|
if(!stat(file, &buf)) |
230 |
|
if(S_ISREG(buf.st_mode)) |
231 |
|
return MAXIMUM(buf.st_mtime, buf.st_ctime); |
232 |
|
|
233 |
|
return FALSE; |
234 |
|
|
235 |
|
} |
236 |
|
|
237 |
|
|