MCPcopy Create free account
hub / github.com/catboost/catboost / StripFileComponent

Function StripFileComponent

util/folder/dirut.cpp:662–668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

660}
661
662TString StripFileComponent(const TString& fileName) {
663 TString dir = IsDir(fileName) ? fileName : GetDirName(fileName);
664 if (!dir.empty() && dir.back() != GetDirectorySeparator()) {
665 dir.append(GetDirectorySeparator());
666 }
667 return dir;
668}

Callers 1

Y_UNIT_TESTFunction · 0.85

Calls 6

GetDirNameFunction · 0.85
GetDirectorySeparatorFunction · 0.85
IsDirFunction · 0.70
emptyMethod · 0.45
backMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected