Feature/filesystem cleanup (#1587)

* Adapting to the changes in Ghoul
* First step of moving filesystem functions to std
* Remove persistence flag from cachemanager
This commit is contained in:
Alexander Bock
2021-05-16 20:26:49 +02:00
committed by GitHub
parent 2ca7101b6c
commit ccdc5a5dc3
87 changed files with 648 additions and 711 deletions

View File

@@ -30,6 +30,7 @@
#include <ghoul/filesystem/filesystem.h>
#include <ghoul/filesystem/cachemanager.h>
#include <ghoul/logging/logmanager.h>
#include <filesystem>
#include <numeric>
#include <queue>
@@ -506,11 +507,9 @@ bool TSP::readCache() {
if (!FileSys.cacheManager())
return false;
ghoul::filesystem::File f = _filename;
std::string cacheFilename = FileSys.cacheManager()->cachedFilename(
f.baseName(),
"",
ghoul::filesystem::CacheManager::Persistent::Yes
std::filesystem::path(_filename).stem(),
""
);
std::ifstream file(cacheFilename, std::ios::in | std::ios::binary);
@@ -546,11 +545,9 @@ bool TSP::writeCache() {
return false;
}
ghoul::filesystem::File f = _filename;
std::string cacheFilename = FileSys.cacheManager()->cachedFilename(
f.baseName(),
"",
ghoul::filesystem::CacheManager::Persistent::Yes
std::filesystem::path(_filename).stem(),
""
);
std::ofstream file(cacheFilename, std::ios::out | std::ios::binary);