MCPcopy Create free account
hub / github.com/AbyssEngine/AbyssEngineOld / fileExists

Method fileExists

src/Abyss/FileSystem/FileLoader.cpp:52–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52bool MultiFileLoader::fileExists(std::string_view path) {
53 auto it = _cacheWhere.find(path);
54 if (it != _cacheWhere.end()) {
55 return it->second != -1;
56 }
57
58 int i = 0;
59 for (const auto &provider : _providers) {
60 if (provider->has(path)) {
61 _cacheWhere[path] = i;
62 return true;
63 }
64 ++i;
65 }
66
67 _cacheWhere[path] = -1;
68 return false;
69}
70
71void MultiFileLoader::addProvider(std::unique_ptr<Provider> provider) {
72 auto lock = std::lock_guard(_mutex);

Callers

nothing calls this directly

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected