0.0.2 • Published 8 years ago

fs-mode-to-string v0.0.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

fs-mode-to-string

Create a Unix-like permissions string from an fs.stat file or directory mode, eg 0777to -rwxrwxrwx

Travis Downloads

Install

npm i -S fs-mode-to-string

Usage

var fs = require('fs');
var modeString = require('fs-mode-to-string');

// Pass an fs.stat object
var dirMode = fs.statSync('.');
console.log(modeString(dirMode));
// -> 'drwxr--r--'

// Pass an integer
console.log(modeString(0777));
// -> '-rwxrwxrwx'

License

MIT