/[monit]/monit/util.c
ViewVC logotype

Diff of /monit/util.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.30 by hauk, Fri Sep 6 09:54:52 2002 UTC revision 1.31 by hauk, Fri Sep 6 18:13:37 2002 UTC
# Line 658  int exist_file(char *file) { Line 658  int exist_file(char *file) {
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

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26