MCPcopy Create free account
hub / github.com/apache/mesos / buildPath

Function buildPath

src/slave/containerizer/mesos/paths.cpp:48–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46namespace paths {
47
48string buildPath(
49 const ContainerID& containerId,
50 const string& separator,
51 const Mode& mode)
52{
53 if (!containerId.has_parent()) {
54 switch (mode) {
55 case PREFIX: return path::join(separator, containerId.value());
56 case SUFFIX: return path::join(containerId.value(), separator);
57 case JOIN: return containerId.value();
58 default: UNREACHABLE();
59 }
60 } else {
61 const string path = buildPath(containerId.parent(), separator, mode);
62
63 switch (mode) {
64 case PREFIX: return path::join(path, separator, containerId.value());
65 case SUFFIX: return path::join(path, containerId.value(), separator);
66 case JOIN: return path::join(path, separator, containerId.value());
67 default: UNREACHABLE();
68 }
69 }
70}
71
72
73string getRuntimePath(

Callers 5

TEST_FFunction · 0.85
TESTFunction · 0.85
getRuntimePathFunction · 0.85
getCgroupPathFunction · 0.85
__prepareMethod · 0.85

Calls 2

joinFunction · 0.50
valueMethod · 0.45

Tested by 2

TEST_FFunction · 0.68
TESTFunction · 0.68