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

Method Direct

src/Abyss/FileSystem/Direct.cpp:16–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14}
15
16Direct::Direct(const std::filesystem::path &path) : _basePath(path) {
17 for (const auto &entry : std::filesystem::recursive_directory_iterator(_basePath)) {
18 if (!entry.is_regular_file())
19 continue;
20 std::string p = entry.path().lexically_relative(_basePath).string();
21 std::string lower = p;
22 std::ranges::replace(lower, '\\', '/');
23 absl::AsciiStrToLower(&lower);
24 _files[std::move(lower)] = std::move(p);
25 }
26}
27
28bool Direct::has(std::string_view path) { return _files.contains(normalizePath(path)); }
29

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected