mirror of https://github.com/trapexit/mergerfs.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
549 B
28 lines
549 B
#include "branch2.hpp"
|
|
|
|
#include <iostream>
|
|
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
|
|
|
|
Branch2::Branch2()
|
|
: mode(Mode::RW)
|
|
{
|
|
|
|
}
|
|
|
|
Branch2::Branch2(toml::value const &v_)
|
|
: mode(Mode::RW)
|
|
{
|
|
std::cout << v_ << '\n';
|
|
|
|
enabled = v_.at("enabled").as_boolean();
|
|
mode = Mode::_from_string(toml::find<std::string>(v_,"mode").c_str());
|
|
min_free_space = 0;
|
|
path = toml::find<std::string>(v_,"path");
|
|
|
|
int const flags = O_DIRECTORY | O_PATH;
|
|
fd = openat(AT_FDCWD,path.string().c_str(),O_DI
|
|
}
|