Mercurial > repos > blastem
diff util.h @ 957:1618d3676a35
Save state menu WIP
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 15 Apr 2016 23:57:50 -0700 |
parents | 229c23b3ab73 |
children | 51885857c019 |
line wrap: on
line diff
--- a/util.h Fri Apr 15 20:39:26 2016 -0700 +++ b/util.h Fri Apr 15 23:57:50 2016 -0700 @@ -2,6 +2,7 @@ #define UTIL_H_ #include <stdio.h> +#include <time.h> typedef struct { char *name; @@ -40,6 +41,8 @@ dir_entry *get_dir_list(char *path, size_t *numret); //Frees a dir list returned by get_dir_list void free_dir_list(dir_entry *list, size_t numentries); +//Gets the modification time of a file +time_t get_modification_time(char *path); //Recusrively creates a directory if it does not exist int ensure_dir_exists(char *path); //Returns the contents of a symlink in a newly allocated string