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

Method Matches

framework/src/bundle/BundleResourceContainer.cpp:263–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261 }
262
263 bool
264 BundleResourceContainer::Matches(std::string const& name, std::string const& filePattern) const
265 {
266 // short-cut
267 if (filePattern == "*")
268 {
269 return true;
270 }
271
272 std::stringstream ss(filePattern);
273 std::string tok;
274 std::size_t pos = 0;
275 while (std::getline(ss, tok, '*'))
276 {
277 std::size_t index = name.find(tok, pos);
278 if (index == std::string::npos)
279 {
280 return false;
281 }
282 pos = index + tok.size();
283 }
284 return true;
285 }
286
287 void
288 BundleResourceContainer::OpenAndInitializeContainer() const

Callers 1

FindNodesMethod · 0.95

Calls 2

findMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected