comparison include/core/filesystem.h @ 413:192da585a0a8 default tip

*: fix formatting the clang-format file was broken andjust using LLVM defaults. now it's fixed and is more in line with what I actually prefer my code to look like -- esp. with regards to tabulators
author Paper <paper@tflc.us>
date Sat, 25 Jul 2026 14:54:32 -0400
parents e561b7542b7b
children
comparison
equal deleted inserted replaced
412:05aed03e0111 413:192da585a0a8
13 std::filesystem::path GetAnimeDBPath(); // (dotpath)/anime/db.json 13 std::filesystem::path GetAnimeDBPath(); // (dotpath)/anime/db.json
14 std::filesystem::path GetTorrentsPath(); // (dotpath)/torrents/... 14 std::filesystem::path GetTorrentsPath(); // (dotpath)/torrents/...
15 std::filesystem::path GetAnimePostersPath(); // (dotpath)/anime/posters/ 15 std::filesystem::path GetAnimePostersPath(); // (dotpath)/anime/posters/
16 16
17 struct PathHash { 17 struct PathHash {
18 auto operator()(const std::filesystem::path &p) const noexcept { 18 auto operator()(const std::filesystem::path &p) const noexcept { return std::filesystem::hash_value(p); }
19 return std::filesystem::hash_value(p);
20 }
21 }; 19 };
22 20
23 template<typename T> 21 template<typename T>
24 using PathMap = std::unordered_map<std::filesystem::path, T, PathHash>; 22 using PathMap = std::unordered_map<std::filesystem::path, T, PathHash>;
25 23
40 virtual ~IWatcher() = default; 38 virtual ~IWatcher() = default;
41 virtual void Process() = 0; 39 virtual void Process() = 0;
42 }; 40 };
43 41
44 /* Constructor functions. Yes, I'm doing this the C way :) */ 42 /* Constructor functions. Yes, I'm doing this the C way :) */
45 IWatcher *GetRecursiveFilesystemWatcher(void *opaque, const std::filesystem::path &path, 43 IWatcher *GetRecursiveFilesystemWatcher(
46 IWatcher::EventHandler handler); 44 void *opaque, const std::filesystem::path &path, IWatcher::EventHandler handler);
47 IWatcher *GetFilesystemWatcher(void *opaque, const std::filesystem::path &path, IWatcher::EventHandler handler); 45 IWatcher *GetFilesystemWatcher(void *opaque, const std::filesystem::path &path, IWatcher::EventHandler handler);
48 46
49 } // namespace Filesystem 47 } // namespace Filesystem
50 48
51 #endif // MINORI_CORE_FILESYSTEM_H_ 49 #endif // MINORI_CORE_FILESYSTEM_H_