aboutsummaryrefslogtreecommitdiff
path: root/src/Storage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Storage.cpp')
-rw-r--r--src/Storage.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Storage.cpp b/src/Storage.cpp
index 85a150c..7103b7a 100644
--- a/src/Storage.cpp
+++ b/src/Storage.cpp
@@ -118,6 +118,15 @@ namespace QuickMedia {
return -1;
}
+ bool file_get_last_modified_time_seconds(const char *path, time_t *result) {
+ struct stat file_stat;
+ if(stat(path, &file_stat) == 0) {
+ *result = file_stat.st_mtim.tv_sec;
+ return true;
+ }
+ return false;
+ }
+
static int file_overwrite(const Path &path, const char *str, size_t size) {
FILE *file = fopen(path.data.c_str(), "wb");
if(!file) {