| 100 | } |
| 101 | |
| 102 | string_view_t path::__parent_path() const { |
| 103 | if (empty()) |
| 104 | return {}; |
| 105 | // Determine if we have a root path but not a relative path. In that case |
| 106 | // return *this. |
| 107 | { |
| 108 | auto PP = PathParser::CreateBegin(__pn_); |
| 109 | if (ConsumeRootDir(&PP)) |
| 110 | return __pn_; |
| 111 | } |
| 112 | // Otherwise remove a single element from the end of the path, and return |
| 113 | // a string representing that path |
| 114 | { |
| 115 | auto PP = PathParser::CreateEnd(__pn_); |
| 116 | --PP; |
| 117 | if (PP.RawEntry.data() == __pn_.data()) |
| 118 | return {}; |
| 119 | --PP; |
| 120 | return createView(__pn_.data(), &PP.RawEntry.back()); |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | string_view_t path::__filename() const { |
| 125 | if (empty()) |
nothing calls this directly
no test coverage detected