mirror of
https://github.com/trapexit/mergerfs.git
synced 2025-03-15 02:35:12 +08:00
Merge pull request #86 from trapexit/readdir-cleanup
remove unused readdir function
This commit is contained in:
commit
efadd2c8d8
@ -43,7 +43,6 @@ using std::string;
|
|||||||
using std::vector;
|
using std::vector;
|
||||||
using std::set;
|
using std::set;
|
||||||
using std::pair;
|
using std::pair;
|
||||||
using mergerfs::readdir::FileData;
|
|
||||||
|
|
||||||
#define NO_OFFSET 0
|
#define NO_OFFSET 0
|
||||||
|
|
||||||
@ -86,35 +85,10 @@ _readdir(const vector<string> &srcmounts,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static
|
|
||||||
int
|
|
||||||
stat_vector_filler(void *buf,
|
|
||||||
const char *name,
|
|
||||||
const struct stat *stbuf,
|
|
||||||
off_t off)
|
|
||||||
{
|
|
||||||
vector<FileData> *stats = (vector<FileData>*)buf;
|
|
||||||
|
|
||||||
stats->push_back(FileData(name,*stbuf));
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace mergerfs
|
namespace mergerfs
|
||||||
{
|
{
|
||||||
namespace readdir
|
namespace readdir
|
||||||
{
|
{
|
||||||
int
|
|
||||||
readdir(const vector<string> &srcmounts,
|
|
||||||
const string &dirname,
|
|
||||||
vector<FileData> &stats)
|
|
||||||
{
|
|
||||||
return _readdir(srcmounts,
|
|
||||||
dirname,
|
|
||||||
&stats,
|
|
||||||
stat_vector_filler);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
readdir(const char *fusepath,
|
readdir(const char *fusepath,
|
||||||
void *buf,
|
void *buf,
|
||||||
|
@ -38,29 +38,12 @@ namespace mergerfs
|
|||||||
{
|
{
|
||||||
namespace readdir
|
namespace readdir
|
||||||
{
|
{
|
||||||
struct FileData
|
|
||||||
{
|
|
||||||
FileData(const std::string &filename_,
|
|
||||||
const struct stat &stats_)
|
|
||||||
: filename(filename_),
|
|
||||||
stats(stats_)
|
|
||||||
{}
|
|
||||||
|
|
||||||
std::string filename;
|
|
||||||
struct stat stats;
|
|
||||||
};
|
|
||||||
|
|
||||||
int
|
int
|
||||||
readdir(const char *fusepath,
|
readdir(const char *fusepath,
|
||||||
void *buf,
|
void *buf,
|
||||||
fuse_fill_dir_t filler,
|
fuse_fill_dir_t filler,
|
||||||
off_t offset,
|
off_t offset,
|
||||||
struct fuse_file_info *fi);
|
struct fuse_file_info *fi);
|
||||||
|
|
||||||
int
|
|
||||||
readdir(const std::vector<std::string> &srcmounts,
|
|
||||||
const std::string &dirname,
|
|
||||||
std::vector<FileData> &stats);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user