From 6d3c3132bbc0421c42e587b869984fd39f0b35a2 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 16 Feb 2020 02:06:56 +0100 Subject: Fix cmake build library dependency order --- include/FileUtil.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/FileUtil.hpp b/include/FileUtil.hpp index d740fff..b88d58a 100644 --- a/include/FileUtil.hpp +++ b/include/FileUtil.hpp @@ -41,6 +41,14 @@ namespace sibs // Return true if you want to continue iterating the remaining files, return false if you want to stop using FileWalkCallbackFunc = std::function; + struct FileWithTimestamp { + FileString filepath; + FileString extension; + struct timespec last_modified; + }; + + using SortedFileWalkCallbackFunc = std::function; + enum class FileType { FILE_NOT_FOUND, @@ -52,6 +60,7 @@ namespace sibs void walkDir(const _tinydir_char_t *directory, FileWalkCallbackFunc callbackFunc); void walkDirFiles(const _tinydir_char_t *directory, FileWalkCallbackFunc callbackFunc); bool walkDirFilesRecursive(const _tinydir_char_t *directory, FileWalkCallbackFunc callbackFunc); + bool walkDirFilesRecursiveSortTimestamp(const _tinydir_char_t *directory, SortedFileWalkCallbackFunc callbackFunc); Result getFileContent(const _tinydir_char_t *filepath); Result fileWrite(const _tinydir_char_t *filepath, StringView data); Result fileOverwrite(const _tinydir_char_t *filepath, StringView data); -- cgit v1.2.3