MCPcopy Create free account
hub / github.com/ceph/ceph / parse_bits

Method parse_bits

src/include/filepath.cc:44–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void filepath::parse_bits() const {
45 bits.clear();
46 int off = 0;
47 while (off < (int)path.length()) {
48 int nextslash = path.find('/', off);
49 if (nextslash < 0)
50 nextslash = path.length(); // no more slashes
51 if (((nextslash - off) > 0) || encoded) {
52 // skip empty components unless they were introduced deliberately
53 // see commit message for more detail
54 bits.push_back( path.substr(off,nextslash-off) );
55 }
56 off = nextslash+1;
57 }
58}
59
60void filepath::set_trimmed() {
61 if (trimmed)

Callers

nothing calls this directly

Calls 5

substrMethod · 0.80
clearMethod · 0.45
lengthMethod · 0.45
findMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected