| 195 | } |
| 196 | |
| 197 | static Result getDirectoryName(StringSpan path, StringPath& directory) |
| 198 | { |
| 199 | const native_char_t* text = path.getNullTerminatedNative(); |
| 200 | const size_t length = nativeLength(path); |
| 201 | size_t last = length; |
| 202 | while (last > 0) |
| 203 | { |
| 204 | if (isSeparator(text[last - 1])) |
| 205 | { |
| 206 | return assignNativeSlice(directory, text, last - 1); |
| 207 | } |
| 208 | last--; |
| 209 | } |
| 210 | return Result::Error("Missing directory separator"); |
| 211 | } |
| 212 | |
| 213 | static bool pathViewEquals(StringSpan lhs, StringSpan rhs) |
| 214 | { |
no test coverage detected