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

Method GetDataFile

framework/src/bundle/BundleContext.cpp:441–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439 }
440
441 std::string
442 BundleContext::GetDataFile(std::string const& filename) const
443 {
444 if (!d)
445 {
446 throw cppmicroservices::IllegalStateException("The bundle context is no longer valid");
447 }
448
449 d->CheckValid();
450 auto b = GetAndCheckBundlePrivate(d);
451
452 std::string dataRoot = b->bundleDir;
453 if (!dataRoot.empty())
454 {
455 if (!util::Exists(dataRoot))
456 {
457 util::MakePath(dataRoot);
458 }
459 return dataRoot + util::DIR_SEP + filename;
460 }
461 return std::string();
462 }
463
464 std::vector<Bundle>
465 BundleContext::InstallBundles(std::string const& location, cppmicroservices::AnyMap const& bundleManifest)

Callers 3

frame020bMethod · 0.80
frame037aMethod · 0.80
TEST_FFunction · 0.80

Calls 5

GetAndCheckBundlePrivateFunction · 0.85
ExistsFunction · 0.85
MakePathFunction · 0.85
CheckValidMethod · 0.80
emptyMethod · 0.45

Tested by 3

frame020bMethod · 0.64
frame037aMethod · 0.64
TEST_FFunction · 0.64