1
0
mirror of https://github.com/fuse-friends/fuse-native synced 2024-10-27 18:34:01 +00:00
fuse-friends_fuse-native/test/fixtures/stat.js

12 lines
397 B
JavaScript
Raw Normal View History

2015-03-22 11:57:52 +00:00
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),
uid: st.uid !== undefined ? st.uid : process.getuid(),
gid: st.gid !== undefined ? st.gid : process.getgid()
}
}