Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

chmodr

1.2.0 • Public • Published

Description

Has the same effect as the command line command: chmod -R.

Install

npm i --save chmodr

Usage

Takes the same arguments as fs.chmod()

chmodr(path, mode, callback)

  • path <string> | <Buffer> | <URL>
  • mode <integer>
  • callback <Function>
    • err <Error>

Example

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');
  }
});

Keywords

none

install

npm i chmodr

Downloadsweekly downloads

85,245

version

1.2.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability