aboutsummaryrefslogtreecommitdiff
path: root/include/Storage.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/Storage.hpp')
-rw-r--r--include/Storage.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/Storage.hpp b/include/Storage.hpp
index 19dd345..60c15f6 100644
--- a/include/Storage.hpp
+++ b/include/Storage.hpp
@@ -20,8 +20,8 @@ namespace QuickMedia {
DESC
};
- // Return false to stop the iterator
- using FileIteratorCallback = std::function<bool(const Path &filepath, FileType file_type)>;
+ // Return false to stop the iterator.
+ using FileIteratorCallback = std::function<bool(const Path &filepath, FileType file_type, time_t last_modified_seconds)>;
Path get_home_dir();
Path get_storage_dir();
@@ -34,8 +34,10 @@ namespace QuickMedia {
bool file_get_last_modified_time_seconds(const char *path, time_t *result);
int file_overwrite(const Path &path, const std::string &data);
int file_overwrite_atomic(const Path &path, const std::string &data);
+ // The callback is called with 0 as the argument (last_modified_seconds)
void for_files_in_dir(const Path &path, FileIteratorCallback callback);
void for_files_in_dir_sort_last_modified(const Path &path, FileIteratorCallback callback, FileSortDirection sort_dir = FileSortDirection::ASC);
+ // The callback is called with 0 as the argument (last_modified_seconds)
void for_files_in_dir_sort_name(const Path &path, FileIteratorCallback callback, FileSortDirection sort_dir = FileSortDirection::ASC);
bool read_file_as_json(const Path &filepath, Json::Value &result);