3#include "FileManager.h"
11 size_t pathHash::operator () (
const filesystem::path& filePath)
const noexcept
13 return hash<string>()(filePath.string());
19 void addCache(filesystem::path&& filePath,
string&& data)
22 unique_lock<mutex> lock(cache.cacheDataMutex);
24 if (cache.currentCacheSize + data.size() > cache.cacheSize)
29 cache.cacheData.try_emplace(move(filePath), move(data));
Cache & getCache()
Cache getter.
static FileManager & getInstance()
Singleton getter Also initialize thread pool with max threads for current hardware Default getter aft...