2006-10-20 [colin] 2.5.6cvs3
[claws.git] / src / common / utils.c
index c015fc6f26c7fda8644483ea8856e23712bc8e41..dcd0375036ca71b0862f4c55e663dc566eeac63f 100644 (file)
@@ -2048,6 +2048,18 @@ off_t get_file_size(const gchar *file)
        return s.st_size;
 }
 
+time_t get_file_mtime(const gchar *file)
+{
+       struct stat s;
+
+       if (g_stat(file, &s) < 0) {
+               FILE_OP_ERROR(file, "stat");
+               return -1;
+       }
+
+       return s.st_mtime;
+}
+
 off_t get_file_size_as_crlf(const gchar *file)
 {
        FILE *fp;