()
| 164 | } |
| 165 | |
| 166 | public FilePath getParent() { |
| 167 | var split = split(); |
| 168 | if (split.size() == 0) { |
| 169 | return this; |
| 170 | } |
| 171 | |
| 172 | if (split.size() == 1) { |
| 173 | return value.startsWith("/") && !value.equals("/") ? FilePath.of("/") : this; |
| 174 | } |
| 175 | |
| 176 | return FilePath.of(value.substring(0, value.length() - getFileName().length() - 1)); |
| 177 | } |
| 178 | |
| 179 | public boolean startsWith(String start) { |
| 180 | return startsWith(FilePath.of(start)); |
nothing calls this directly
no test coverage detected