MCPcopy Create free account
hub / github.com/Icinga/icinga2 / CreatePackage

Method CreatePackage

lib/remote/configpackageutility.cpp:23–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23void ConfigPackageUtility::CreatePackage(const String& name)
24{
25 String path = GetPackageDir() + "/" + name;
26
27 if (Utility::PathExists(path))
28 BOOST_THROW_EXCEPTION(std::invalid_argument("Package already exists."));
29
30 Utility::MkDirP(path, 0700);
31 WritePackageConfig(name);
32}
33
34void ConfigPackageUtility::DeletePackage(const String& name)
35{

Callers

nothing calls this directly

Calls 2

PathExistsFunction · 0.85
MkDirPFunction · 0.85

Tested by

no test coverage detected