mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-10-26 19:01:56 -04:00
wrap most posix filesystem functions
This commit is contained in:
parent
18d684cd16
commit
1dc7bff6e6
69 changed files with 1262 additions and 227 deletions
|
|
@ -22,10 +22,11 @@
|
|||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
#include <dirent.h>
|
||||
|
||||
#include "config.hpp"
|
||||
#include "errno.hpp"
|
||||
#include "fs_base_closedir.hpp"
|
||||
#include "fs_base_opendir.hpp"
|
||||
#include "fs_base_readdir.hpp"
|
||||
#include "fs_path.hpp"
|
||||
#include "readdir.hpp"
|
||||
#include "rwlock.hpp"
|
||||
|
|
@ -55,11 +56,11 @@ _readdir(const vector<string> &srcmounts,
|
|||
|
||||
fs::path::make(&srcmounts[i],dirname,basepath);
|
||||
|
||||
dh = ::opendir(basepath.c_str());
|
||||
dh = fs::opendir(basepath);
|
||||
if(!dh)
|
||||
continue;
|
||||
|
||||
for(struct dirent *de = ::readdir(dh); de != NULL; de = ::readdir(dh))
|
||||
for(struct dirent *de = fs::readdir(dh); de != NULL; de = fs::readdir(dh))
|
||||
{
|
||||
if(found.insert(de->d_name).second == false)
|
||||
continue;
|
||||
|
|
@ -69,7 +70,7 @@ _readdir(const vector<string> &srcmounts,
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
::closedir(dh);
|
||||
fs::closedir(dh);
|
||||
}
|
||||
|
||||
if(found.empty())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue