mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-25 17:36:25 -05:00
checkpoint
This commit is contained in:
parent
202f29286b
commit
c8e8865495
19 changed files with 76 additions and 80 deletions
|
|
@ -16,35 +16,30 @@
|
|||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "fuse_truncate_func_all.hpp"
|
||||
#include "fuse_truncate_policy_all.hpp"
|
||||
#include "fuse_truncate_err.hpp"
|
||||
|
||||
#include "fs_truncate.hpp"
|
||||
|
||||
|
||||
namespace gfs = ghc::filesystem;
|
||||
|
||||
|
||||
FUSE::TRUNCATE::FuncALL::FuncALL(const toml::value &toml_)
|
||||
FUSE::TRUNCATE::POLICY::ALL::ALL(const toml::value &toml_)
|
||||
: _branches(toml_)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
FUSE::TRUNCATE::FuncALL::operator()(const char *fusepath_,
|
||||
const off_t length_)
|
||||
FUSE::TRUNCATE::POLICY::ALL::operator()(const gfs::path &fusepath_,
|
||||
const off_t length_)
|
||||
{
|
||||
Err rv;
|
||||
gfs::path fusepath;
|
||||
gfs::path fullpath;
|
||||
|
||||
fusepath = &fusepath_[1];
|
||||
for(const auto &branch_group : _branches)
|
||||
{
|
||||
for(const auto &branch : branch_group)
|
||||
{
|
||||
fullpath = branch.path / fusepath;
|
||||
fullpath = branch.path / fusepath_;
|
||||
|
||||
rv = fs::truncate(fullpath,length_);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue