23namespace fs = std::filesystem;
42 fs::path m_path_dir_upper;
43 std::vector<fs::path> m_vec_path_dir_layer;
46 , fs::path
const& path_dir_mount
47 , fs::path
const& path_dir_upper
48 , fs::path
const& path_file_log
49 , std::vector<fs::path>
const& vec_path_dir_layer
63 , fs::path
const& path_dir_mount
64 , fs::path
const& path_dir_upper
65 , fs::path
const& path_file_log
66 , std::vector<fs::path>
const& vec_path_dir_layer
69 , m_path_dir_upper(path_dir_upper)
70 , m_vec_path_dir_layer(vec_path_dir_layer)
72 this->
mount().discard(
"E::Could not mount unionfs filesystem to '{}'", path_dir_mount);
86 auto path_file_unionfs = Pop(
ns_env::search_path(
"unionfs"),
"E::Could not find unionfs in PATH");
90 std::string arg_layers=std::format(
"{}=RW", m_path_dir_upper.string());
91 for (
auto&& path_dir_layer : m_vec_path_dir_layer | std::views::reverse)
93 arg_layers += std::format(
":{}=RO", path_dir_layer.string());
Filesystem(pid_t pid_to_die_for, std::filesystem::path const &path_dir_mount, std::filesystem::path const &path_file_log)
Construct a new Filesystem object.
UnionFs(pid_t pid_to_die_for, fs::path const &path_dir_mount, fs::path const &path_dir_upper, fs::path const &path_file_log, std::vector< fs::path > const &vec_path_dir_layer)
Construct a new Union Fs:: Union Fs object.
Value< void > mount() override
Mounts the filesystem.
Subprocess & with_die_on_pid(pid_t pid)
Configures the child process to die when the specified PID dies.
std::unique_ptr< Child > spawn()
Spawns (forks) the child process and begins execution.
Subprocess & with_stdio(Stream mode)
Sets the stdio redirection mode for the child process.
Subprocess & with_log_file(std::filesystem::path const &path)
Configures logging output for child process stdout/stderr.
Subprocess & with_args(Args &&... args)
Arguments forwarded as the process' arguments.
The base class for filesystems.
A library for operations on fuse filesystems.
A library for manipulating environment variables.
Value< fs::path > search_path(std::string const &query)
Search the directories in the PATH variable for the given input file name.
Base filesystem interface and abstraction.
UnionFS-FUSE overlay filesystem implementation.
Value< fs::path > create_directories(fs::path const &p)
Creates directories recursively.
void wait_fuse(fs::path const &path_dir_filesystem)
Waits for the given directory to not be fuse.
Stream
Stream redirection modes for child process stdio.
Enhanced expected type with integrated logging capabilities.
A library to spawn sub-processes in linux.