| 14 | } |
| 15 | |
| 16 | Direct::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 | |
| 28 | bool Direct::has(std::string_view path) { return _files.contains(normalizePath(path)); } |
| 29 |
nothing calls this directly
no outgoing calls
no test coverage detected