Add support for chmod
This commit is contained in:
parent
9b3914522d
commit
d1e9d38f53
1
index.js
1
index.js
@ -25,6 +25,7 @@ const ops = {
|
||||
fgetattr: require('./ops/fgetattr'),
|
||||
symlink: require('./ops/symlink'),
|
||||
readlink: require('./ops/readlink'),
|
||||
chmod: require('./ops/chmod'),
|
||||
}
|
||||
|
||||
;(async () => {
|
||||
|
18
ops/chmod.js
Normal file
18
ops/chmod.js
Normal file
@ -0,0 +1,18 @@
|
||||
const Fuse = require('fuse-native')
|
||||
const Errors = require('../../shared/Errors')
|
||||
const Message = require('../../shared/Message')
|
||||
const connector = require('../connector')
|
||||
|
||||
module.exports = exports = function (path, mode, cb) {
|
||||
connector.send(
|
||||
Message.route('fs.chmod')
|
||||
.data({ path, mode })
|
||||
.expect_response(msg => {
|
||||
if ( msg.error() ) {
|
||||
return Errors.toCallback(cb, msg.error())
|
||||
}
|
||||
|
||||
return process.nextTick(cb, 0)
|
||||
})
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue
Block a user