diff options
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -366,6 +366,15 @@ void free_dir_list(dir_entry *list, size_t numentries) free(list); } +time_t get_modification_time(char *path) +{ + struct stat st; + if (stat(path, &st)) { + return 0; + } + return st.st_mtim.tv_sec; +} + int ensure_dir_exists(char *path) { struct stat st; |