MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / getNativeParentPath

Method getNativeParentPath

source/io/fs.cpp:252–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250}
251
252BString Fs::getNativeParentPath(const BString& path) {
253 int pos = path.lastIndexOf(Fs::nativePathSeperator);
254 if (pos != -1) {
255 return path.substr(0, pos);
256 }
257 pos = path.lastIndexOf('/');
258 if (pos != -1) {
259 return path.substr(0, pos);
260 }
261 return path;
262}
263
264BString Fs::getFileNameFromPath(const BString& path) {
265 int pos = path.lastIndexOf('/');

Callers

nothing calls this directly

Calls 2

lastIndexOfMethod · 0.80
substrMethod · 0.80

Tested by

no test coverage detected