diff options
Diffstat (limited to 'oop2eindopdr/CacheManager.cpp')
| -rw-r--r-- | oop2eindopdr/CacheManager.cpp | 10 | 
1 files changed, 8 insertions, 2 deletions
diff --git a/oop2eindopdr/CacheManager.cpp b/oop2eindopdr/CacheManager.cpp index 6fffa2c..fad7b65 100644 --- a/oop2eindopdr/CacheManager.cpp +++ b/oop2eindopdr/CacheManager.cpp @@ -38,11 +38,17 @@ void CacheManager::update_cache() {  }  std::fstream* CacheManager::cache_get(const char* filename) { -	std::fstream* file = new std::fstream(filename, std::ios::out | std::ios::in); +	std::fstream* file = new std::fstream(prefix_cache_path(filename), std::ios::out | std::ios::in);  	this->files.push_back(file);  	return file;  }  bool CacheManager::cache_exists(const char* filename) { -	return true; +	return std::filesystem::exists(prefix_cache_path(filename)); +} + +std::string CacheManager::prefix_cache_path(const char* filename) { +	std::string out = this->cache_path; +	out.append(filename); +	return out;  }  |