| 290 | } |
| 291 | |
| 292 | bool PlatformFileSystem::addMapping(std::string_view what, |
| 293 | std::string_view with) { |
| 294 | std::filesystem::path original = normalize(what); |
| 295 | std::filesystem::path replacement = normalize(with); |
| 296 | |
| 297 | if (!original.is_absolute() || !replacement.is_absolute()) return false; |
| 298 | |
| 299 | Mapping &mapping = m_mappings.emplace_back(); |
| 300 | mapping.m_what = original.string(); |
| 301 | mapping.m_with = replacement.string(); |
| 302 | return true; |
| 303 | } |
| 304 | |
| 305 | std::string PlatformFileSystem::remap(std::string_view what) { |
| 306 | for (const Mapping &mapping : m_mappings) { |
no outgoing calls