MCPcopy Create free account
hub / github.com/CppMicroServices/CppMicroServices / OnlyContainsManifest

Function OnlyContainsManifest

framework/src/util/Utils.cpp:89–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 }
88
89 bool
90 OnlyContainsManifest(std::shared_ptr<BundleResourceContainer> const& resContainer)
91 {
92 auto topLevelDirs = resContainer->GetTopLevelDirs();
93 return std::all_of(topLevelDirs.begin(),
94 topLevelDirs.end(),
95 [&resContainer](std::string const& dir) -> bool
96 {
97 std::vector<std::string> names;
98 std::vector<uint32_t> indices;
99
100 resContainer->GetChildren(dir + "/", true, names, indices);
101 return std::all_of(names.begin(),
102 names.end(),
103 [](const std::string& resourceName) -> bool
104 { return resourceName == std::string("manifest.json"); });
105 });
106 }
107
108 //-------------------------------------------------------------------
109 // Framework storage

Callers 1

BundlePrivateMethod · 0.85

Calls 4

GetTopLevelDirsMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
GetChildrenMethod · 0.45

Tested by

no test coverage detected