MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / getFileName

Function getFileName

src/server/gui/core/utils/FileSystemUtil.cpp:453–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451//////////////////////////////////////////////////////////////////////////
452
453 std::string getFileName(const std::string& _path)
454 {
455 const std::string path = getGenericPath(_path);
456 size_t offset = std::string::npos;
457
458 // find last '/' and return the filename
459 if((offset = path.find_last_of('/')) != std::string::npos)
460 return ((path[offset + 1] == 0) ? "." : std::string(path, offset + 1));
461
462 // no '/' found, entire path is a filename
463 return path;
464
465 } // getFileName
466
467//////////////////////////////////////////////////////////////////////////
468

Callers 10

getStemFunction · 0.85
getExtensionFunction · 0.85
isHiddenFunction · 0.85
getFileNameMethod · 0.85
getKeyMethod · 0.85
GuiGameScraperMethod · 0.85
doNextSearchMethod · 0.85
GuiMetaDataEdMethod · 0.85
openMetaDataEdMethod · 0.85

Calls 1

getGenericPathFunction · 0.85

Tested by

no test coverage detected