1
0
mirror of https://github.com/fuse-friends/fuse-native synced 2026-03-02 03:40:15 +00:00

init flow works, getattr fails

This commit is contained in:
Andrew Osheroff
2019-08-01 14:24:01 +02:00
parent bd9d36fb2f
commit e4732baf83
10 changed files with 429 additions and 170 deletions

13
test/fixtures/mnt.js vendored Normal file
View File

@@ -0,0 +1,13 @@
var os = require('os')
var path = require('path')
var fs = require('fs')
var mnt = path.join(os.tmpdir(), 'fuse-bindings-' + process.pid + '-' + Date.now())
try {
fs.mkdirSync(mnt)
} catch (err) {
// do nothing
}
module.exports = mnt

11
test/fixtures/stat.js vendored Normal file
View File

@@ -0,0 +1,11 @@
module.exports = function (st) {
return {
mtime: st.mtime || new Date(),
atime: st.atime || new Date(),
ctime: st.ctime || new Date(),
size: st.size !== undefined ? st.size : 0,
mode: st.mode === 'dir' ? 16877 : (st.mode === 'file' ? 33188 : (st.mode === 'link' ? 41453 : st.mode)),
uid: st.uid !== undefined ? st.uid : process.getuid(),
gid: st.gid !== undefined ? st.gid : process.getgid()
}
}