Has the same effect as the command line command: chmod -R.
npm i --save chmodr
Takes the same arguments as fs.chmod()
chmodr(path, mode, callback)
<string> | <Buffer> | <URL><integer><Function>
<Error>var chmodr = require('chmodr');
chmodr('/var/www/my/test/folder', 0o777, (err) => {
if (err) {
console.log('Failed to execute chmod', err);
} else {
console.log('Success');
}
});
© 2010 - cnpmjs.org x YWFE | Home | YWFE