client/ops/chmod.js

19 lines
542 B
JavaScript
Raw Normal View History

2020-11-27 19:45:00 +00:00
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)
})
)
}