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

Function foreach

src/cli/mesos.cpp:46–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44
45 if (PATH.isSome()) {
46 foreach (const string& path, strings::split(PATH.get(), ":")) {
47 Try<list<string>> matches = fs::list(path::join(path, "mesos-*"));
48 if (matches.isSome()) {
49 foreach (const string& match, matches.get()) {
50 Try<bool> access = os::access(match, X_OK);
51 if (access.isSome() && access.get()) {
52 string basename = Path(match).basename();
53 if (basename != "mesos-slave") {
54 commands.push_back(basename.substr(6));
55 }
56 }
57 }
58 }
59 }
60 }
61
62 cerr

Callers

nothing calls this directly

Calls 7

accessFunction · 0.85
PathClass · 0.85
listFunction · 0.50
joinFunction · 0.50
isSomeMethod · 0.45
getMethod · 0.45
basenameMethod · 0.45

Tested by

no test coverage detected