MCPcopy Create free account
hub / github.com/LunarG/VulkanTools / HasFile

Method HasFile

vkconfig_core/configuration_manager.cpp:250–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250bool 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
264void ConfigurationManager::RemoveConfigurationFiles() {
265 const std::vector<Path> &configuration_files = ::CollectFilePaths(Path(Path::CONFIGS));

Callers 2

TESTFunction · 0.80

Calls 1

AbsolutePathFunction · 0.85

Tested by 1

TESTFunction · 0.64