26 #include "IDobbyUtils.h"
27 #include "ContainerId.h"
29 #if defined(LEGACY_COMPONENTS)
30 #include "DobbySpecConfig.h"
33 #include "DobbyBundleConfig.h"
35 #include <sys/types.h>
59 #if defined(LEGACY_COMPONENTS)
60 DobbyRootfs(
const std::shared_ptr<IDobbyUtils>& utils,
61 const std::shared_ptr<const DobbyBundle>& bundle,
62 const std::shared_ptr<const DobbySpecConfig>& config);
64 DobbyRootfs(
const std::shared_ptr<IDobbyUtils>& utils,
65 const std::shared_ptr<const DobbyBundle>& bundle,
66 const std::shared_ptr<const DobbyBundleConfig>& config);
72 const std::string& path()
const;
75 void setPersistence(
bool persist);
82 #if defined(LEGACY_COMPONENTS)
83 bool createMountPoint(
int dirfd,
const std::string &path,
bool isDirectory)
const;
85 bool createStandardMountPoints(
int dirfd)
const;
87 bool constructRootfs(
int dirfd,
88 const std::shared_ptr<const DobbySpecConfig>& config);
90 bool createAndWriteFileAt(
int dirFd,
91 const std::string& filePath,
92 const std::string& fileContents,
93 mode_t mode = 0644)
const;
98 const std::shared_ptr<IDobbyUtils> mUtilities;
99 const std::shared_ptr<const DobbyBundle> mBundle;
Simple class that just creates a subdir in the bundles directory.
Definition: DobbyBundle.h:46
Creates a directory populated with rootfs based on the supplied container config.
Definition: DobbyRootfs.h:57
DobbyRootfs(const std::shared_ptr< IDobbyUtils > &utils, const std::shared_ptr< const DobbyBundle > &bundle, const std::shared_ptr< const DobbyBundleConfig > &config)
Constructor that populates the object's member variables required internally by Dobby.
Definition: DobbyRootfs.cpp:109
void unmountAllAt(const std::string &pathPrefix)
Unmounts anything mounted at the given path prefix.
Definition: DobbyRootfs.cpp:194
void cleanUp()
Removes the rootfs directory and all it's contents if set persistence set to false.
Definition: DobbyRootfs.cpp:270