MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / makedirname

Function makedirname

tools/comdb2ar/util.cpp:50–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void makedirname(std::string& path)
51// Strip a path down into just a directory name, by removing everything after
52// the last / (and removing the last /). If there is no / then this will leave
53// just the empty string.
54{
55 size_t pos = path.find_last_of('/');
56 if(pos != std::string::npos) {
57 path.resize(pos);
58 } else {
59 path.clear();
60 }
61}
62
63void listdir_internal(std::list<std::string>& output_list,
64 const std::string& dirname, bool recursive, const std::string &prefix)

Callers 2

serialise_databaseFunction · 0.85
output_fileFunction · 0.85

Calls 1

clearMethod · 0.80

Tested by

no test coverage detected