diff options
author | Michael Pavone <pavone@retrodev.com> | 2016-04-15 23:57:50 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2016-04-15 23:57:50 -0700 |
commit | f76ba81c317fdca5f549bcb044d62861609fe6d1 (patch) | |
tree | 0dc9bed8def723181a9655c27886fcc27dccb5d3 /util.c | |
parent | e913f115a678bf2eb0da3a0c6b2ab45830f79028 (diff) |
Save state menu WIP
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; |