MCPcopy Create free account
hub / github.com/dmlc/parameter_server / getPath

Function getPath

src/util/file.cc:400–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398 return elems.empty() ? "" : elems.back();
399}
400string getPath(const string& full) {
401 auto elems = split(full, '/');
402 if (elems.size() <= 1) return full;
403 elems.pop_back();
404 return join(elems, "/");
405}
406string removeExtension(const string& file) {
407 auto elems = split(file, '.');
408 if (elems.size() <= 1) return file;

Callers 4

readOneFileMethod · 0.85
searchFilesFunction · 0.85
writeToFileMethod · 0.85
saveModelMethod · 0.85

Calls 3

splitFunction · 0.85
joinFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected