1 #include "wvfusecbmgr.h"
6 WvFuseCbMgr::WvFuseCbMgr(WvFuse
*_fuse
, WvStringParm _basepath
)
7 : fuse(_fuse
), basepath(_basepath
),
8 callback(WvFuseDirCb(this, &WvFuseCbMgr::callback_func
))
13 WvFuseCbMgr::~WvFuseCbMgr()
18 int WvFuseCbMgr::getfd()
24 void WvFuseCbMgr::callback_func(fuse_dirent
*fde
)
26 WvString fullpath
= basepath
;
27 if (fullpath
[fullpath
.len()] != '/')
29 fullpath
.append(fde
->name
);
30 fde
->ino
= fuse
->get_ino_by_path(fullpath
);
32 size_t reclen
= FUSE_DIRENT_SIZE(fde
);
33 size_t wrres
= fwrite(fde
, reclen
, 1, fp
);