MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / extractFileName

Function extractFileName

core/filetools.cpp:302–310  ·  view source on GitHub ↗

---------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

300
301//---------------------------------------------------------------------------
302 std::string extractFileName(const std::string &name)
303 {
304 std::string s(name);
305 if (isOnlyDirectory(s)) return std::string();
306 cleanFileName(s);
307 fs::path p(s);
308 if (isRoot(name)) return std::string();
309 return p.filename().string();
310 }
311
312//---------------------------------------------------------------------------
313 std::string extractLowestDirName(const std::string &name)

Callers 5

extractBaseNameFunction · 0.85
extractFileExtensionFunction · 0.85
changePathFunction · 0.85
initializeTypeMethod · 0.85
mainFunction · 0.85

Calls 3

isOnlyDirectoryFunction · 0.85
cleanFileNameFunction · 0.85
isRootFunction · 0.85

Tested by

no test coverage detected