Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/popomore/chmod
chmod for nodejs
https://github.com/popomore/chmod
Last synced: 2 months ago
JSON representation
chmod for nodejs
- Host: GitHub
- URL: https://github.com/popomore/chmod
- Owner: popomore
- Created: 2014-03-07T21:27:25.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-10-30T07:06:33.000Z (about 5 years ago)
- Last Synced: 2024-11-01T09:33:51.526Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 5.86 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
Awesome Lists containing this project
README
# Chmod [![Build Status](https://travis-ci.org/popomore/chmod.png?branch=master)](https://travis-ci.org/popomore/chmod) [![Coverage Status](https://coveralls.io/repos/popomore/chmod/badge.png?branch=master)](https://coveralls.io/r/popomore/chmod?branch=master)
Inspired by [gulp-chmod](https://github.com/sindresorhus/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](https://github.com/TooTallNate/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.