| 248 | } |
| 249 | |
| 250 | bool ConfigurationManager::HasFile(const Configuration &configuration) const { |
| 251 | const std::string base_path = ::AbsolutePath(Path::CONFIGS); |
| 252 | |
| 253 | const std::string path = base_path + "/" + configuration.key + ".json"; |
| 254 | |
| 255 | std::FILE *file = std::fopen(path.c_str(), "r"); |
| 256 | if (file) { |
| 257 | std::fclose(file); |
| 258 | return true; |
| 259 | } |
| 260 | |
| 261 | return false; |
| 262 | } |
| 263 | |
| 264 | void ConfigurationManager::RemoveConfigurationFiles() { |
| 265 | const std::vector<Path> &configuration_files = ::CollectFilePaths(Path(Path::CONFIGS)); |