mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-30 03:47:02 -05:00
further abstraction of system calls
This commit is contained in:
parent
1ad05d7783
commit
d0b6cd1f38
8 changed files with 121 additions and 15 deletions
|
|
@ -27,20 +27,29 @@ namespace fs
|
|||
inline
|
||||
int
|
||||
access(const int dirfd,
|
||||
const std::string &pathname,
|
||||
const std::string &path,
|
||||
const int mode,
|
||||
const int flags)
|
||||
{
|
||||
return ::faccessat(dirfd,pathname.c_str(),mode,flags);
|
||||
return ::faccessat(dirfd,path.c_str(),mode,flags);
|
||||
}
|
||||
|
||||
static
|
||||
inline
|
||||
int
|
||||
access(const std::string &pathname,
|
||||
access(const std::string &path,
|
||||
const int mode,
|
||||
const int flags)
|
||||
{
|
||||
return fs::access(AT_FDCWD,pathname,mode,flags);
|
||||
return fs::access(AT_FDCWD,path,mode,flags);
|
||||
}
|
||||
|
||||
static
|
||||
inline
|
||||
int
|
||||
eaccess(const std::string &path,
|
||||
const int mode)
|
||||
{
|
||||
return fs::access(path,mode,AT_EACCESS);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue