Add support for chmod

This commit is contained in:
2020-11-27 13:45:00 -06:00
parent 9b3914522d
commit d1e9d38f53
2 changed files with 19 additions and 0 deletions

18
ops/chmod.js Normal file
View 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)
})
)
}