634 |
|
|
635 |
|
|
636 |
/** |
/** |
|
* @return TRUE if file exist and is a regular file, otherwise FALSE |
|
|
*/ |
|
|
int isreg_file(char *file) { |
|
|
|
|
|
struct stat buf; |
|
|
|
|
|
return (stat(file, &buf) == 0 && S_ISREG(buf.st_mode)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
* @return TRUE if file exist |
|
|
*/ |
|
|
int exist_file(char *file) { |
|
|
|
|
|
struct stat buf; |
|
|
|
|
|
return (stat(file, &buf) == 0); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
637 |
* Returns a (RFC1123) Date string. If the given date |
* Returns a (RFC1123) Date string. If the given date |
638 |
* is NULL compute the date now. |
* is NULL compute the date now. |
639 |
* @param date |
* @param date |