| 60 | } |
| 61 | |
| 62 | static void validatePath(AssetPath const& components, bool canContainSubPath, bool canContainDirectives) { |
| 63 | validateBasePath(components.basePath.utf8()); |
| 64 | |
| 65 | if (!canContainSubPath && components.subPath) |
| 66 | throw AssetException::format("Path '{}' cannot contain sub-path", components); |
| 67 | if (!canContainDirectives && !components.directives.empty()) |
| 68 | throw AssetException::format("Path '{}' cannot contain directives", components); |
| 69 | } |
| 70 | |
| 71 | static void validatePath(StringView path, bool canContainSubPath, bool canContainDirectives) { |
| 72 | std::string_view const& str = path.utf8(); |
no test coverage detected