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

Function cleanFileName

core/filetools.cpp:919–927  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

917 }
918
919 void cleanFileName(std::string &file)
920 {
921 if (file.size() < 2) return;
922 bool networkpath = (file.substr(0, 2) == "\\\\");
923 replaceAll(file, "\\\\", "\\");
924 if (networkpath) file = std::string("\\") + file;
925 if (file.substr(file.size() - 1, 1) == dirsep)
926 file = file.substr(0, file.size() - 1);
927 }
928
929 void cleanDirName(std::string &dir)
930 {

Callers 5

renameFileFunction · 0.85
extractFilePathFunction · 0.85
extractFileNameFunction · 0.85
extractBaseNameFunction · 0.85
cleanDirNameFunction · 0.85

Calls 2

replaceAllFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected