diff options
Diffstat (limited to 'include/Storage.hpp')
-rw-r--r-- | include/Storage.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/Storage.hpp b/include/Storage.hpp index 5b35ba7..4dd8db2 100644 --- a/include/Storage.hpp +++ b/include/Storage.hpp @@ -1,8 +1,13 @@ #pragma once #include "Path.hpp" +#include <functional> +#include <filesystem> namespace QuickMedia { + // Return false to stop the iterator + using FileIteratorCallback = std::function<bool(const std::filesystem::path &filepath)>; + enum class FileType { FILE_NOT_FOUND, REGULAR, @@ -17,4 +22,5 @@ namespace QuickMedia { int file_get_content(const Path &path, std::string &result); int file_overwrite(const Path &path, const std::string &data); int create_lock_file(const Path &path); + void for_files_in_dir(const Path &path, FileIteratorCallback callback); }
\ No newline at end of file |