diff util.c @ 957:1618d3676a35

Save state menu WIP
author Michael Pavone <pavone@retrodev.com>
date Fri, 15 Apr 2016 23:57:50 -0700
parents 229c23b3ab73
children 4899d3ae37b3
line wrap: on
line diff
--- a/util.c	Fri Apr 15 20:39:26 2016 -0700
+++ b/util.c	Fri Apr 15 23:57:50 2016 -0700
@@ -366,6 +366,15 @@
 	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;