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

Method AppendComponent

util/folder/pathsplit.cpp:107–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107void TPathSplitStore::AppendComponent(const TStringBuf comp) {
108 if (!comp || comp == TStringBuf(".")) {
109 // ignore
110 } else if (comp == TStringBuf("..") && !empty() && back() != TStringBuf("..")) {
111 pop_back();
112 } else {
113 // push back first .. also
114 push_back(comp);
115 }
116}
117
118TStringBuf TPathSplitStore::Extension() const {
119 return size() > 0 ? CutExtension(back()) : TStringBuf();

Callers 1

TPathSplitBaseClass · 0.80

Calls 4

emptyFunction · 0.50
backFunction · 0.50
pop_backFunction · 0.50
push_backFunction · 0.50

Tested by

no test coverage detected