Ninety-nine Pitchers of Malt

    chmod

    0.2.1 • Public • Published

    Chmod Build Status Coverage Status

    Inspired by gulp-chmod, but can be used everywhere.


    Install

    $ npm install chmod -g
    

    Usage

    var chmod = require('chmod');
    chmod(file, 777);
    

    Or you can use object instead of number, see stat-mode

    chmod(file, {
      owner: {
        read: true,
        write: true,
        execute: true
      },
      group: {
        read: true,
        write: true,
        execute: true
      },
      others: {
        read: true,
        write: true,
        execute: true
      }
    });
    

    You can also write a object Simply when the same for each

    chmod(file, {
      read: true
    });
    
    // equals
    
    chmod(file, {
      owner: {
        read: true
      },
      group: {
        read: true
      },
      others: {
        read: true
      }
    });
    

    Otherwise will throw

    LISENCE

    Copyright (c) 2014 popomore. Licensed under the MIT license.

    Keywords

    none

    Install

    npm i chmod

    DownloadsWeekly Downloads

    1,215

    Version

    0.2.1

    License

    MIT

    Last publish

    Collaborators

    • popomore