new features: follow-symlinks, rename-exdev, link-exdev

* follow-symlinks: allows mergerfs to transparently follow symlinks
* link-exdev: in the event a link returns EXDEV create a symlink instead
* rename-exdev: in the event a rename returns EXDEV move the oldpath and
  create a symlink for the newpath
This commit is contained in:
Antonio SJ Musumeci 2020-06-21 14:45:14 -04:00
parent 50daf84ec0
commit 8adebc9489
26 changed files with 6980 additions and 450 deletions

View file

@ -18,6 +18,8 @@
#pragma once
#include "ghc/filesystem.hpp"
#include <string>
#include <sys/stat.h>
@ -26,12 +28,30 @@
namespace fs
{
static
inline
int
mkdir(const char *path_,
const mode_t mode_)
{
return ::mkdir(path_,mode_);
}
static
inline
int
mkdir(const std::string &path_,
const mode_t mode_)
{
return ::mkdir(path_.c_str(),mode_);
return fs::mkdir(path_.c_str(),mode_);
}
static
inline
int
mkdir(const ghc::filesystem::path &path_,
const mode_t mode_)
{
return fs::mkdir(path_.c_str(),mode_);
}
}