How to use the unix-permissions.set function in unix-permissions

To help you get started, we’ve selected a few unix-permissions examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ehmicky / unix-permissions / examples / methods / not.js View on Github external
console.log(not('u+xs')) // 'u-xs'

console.log(not('u-xs')) // 'u+xs'

console.log(not('u=x')) // 'u=rws'

console.log(not('a=x')) // 'ug=rws,o=rwt'

console.log(not('rws-ws-w-')) // '---r--r-t'

console.log(not('0660')) // '7117'

console.log(not('1660')) // '6117'

console.log(set('rwxrwxrwx', not('a+x'))) // 'rw-rw-rw-'

console.log(set('---------', not('a-x'))) // '--x--x--x'

console.log(set('a+xr', not('a+r'))) // 'a+x,a-r'
github ehmicky / unix-permissions / examples / methods / not.js View on Github external
console.log(not('u-xs')) // 'u+xs'

console.log(not('u=x')) // 'u=rws'

console.log(not('a=x')) // 'ug=rws,o=rwt'

console.log(not('rws-ws-w-')) // '---r--r-t'

console.log(not('0660')) // '7117'

console.log(not('1660')) // '6117'

console.log(set('rwxrwxrwx', not('a+x'))) // 'rw-rw-rw-'

console.log(set('---------', not('a-x'))) // '--x--x--x'

console.log(set('a+xr', not('a+r'))) // 'a+x,a-r'
github ehmicky / unix-permissions / examples / methods / not.js View on Github external
console.log(not('u=x')) // 'u=rws'

console.log(not('a=x')) // 'ug=rws,o=rwt'

console.log(not('rws-ws-w-')) // '---r--r-t'

console.log(not('0660')) // '7117'

console.log(not('1660')) // '6117'

console.log(set('rwxrwxrwx', not('a+x'))) // 'rw-rw-rw-'

console.log(set('---------', not('a-x'))) // '--x--x--x'

console.log(set('a+xr', not('a+r'))) // 'a+x,a-r'
github ehmicky / unix-permissions / examples / methods / set.js View on Github external
'use strict'

// Ignore the following line: this is only needed for internal purposes.
require('../utils.js')

const { set } = require('unix-permissions')

console.log(set('---------', 'a+x')) // '--x--x--x'

console.log(set('---------', 'a+x', 'a+r')) // 'r-xr-xr-x'

console.log(set('--x--x--x', 'o-x')) // '--x--x---'

console.log(set('a+x', 'a+r')) // 'a+rx'

console.log(set('4660', 'a-st')) // '0660'
github ehmicky / unix-permissions / examples / methods / set.js View on Github external
// This file can be directly run:
//   - first install `unix-permissions`
//   - then `node node_modules/unix-permissions/examples/methods/set.js`
// An online demo is also available at:
//   https://repl.it/@ehmicky/unix-permissions

'use strict'

// Ignore the following line: this is only needed for internal purposes.
require('../utils.js')

const { set } = require('unix-permissions')

console.log(set('---------', 'a+x')) // '--x--x--x'

console.log(set('---------', 'a+x', 'a+r')) // 'r-xr-xr-x'

console.log(set('--x--x--x', 'o-x')) // '--x--x---'

console.log(set('a+x', 'a+r')) // 'a+rx'

console.log(set('4660', 'a-st')) // '0660'
github ehmicky / unix-permissions / examples / methods / set.js View on Github external
// Demo of the `set()` method in JavaScript.
// This file can be directly run:
//   - first install `unix-permissions`
//   - then `node node_modules/unix-permissions/examples/methods/set.js`
// An online demo is also available at:
//   https://repl.it/@ehmicky/unix-permissions

'use strict'

// Ignore the following line: this is only needed for internal purposes.
require('../utils.js')

const { set } = require('unix-permissions')

console.log(set('---------', 'a+x')) // '--x--x--x'

console.log(set('---------', 'a+x', 'a+r')) // 'r-xr-xr-x'

console.log(set('--x--x--x', 'o-x')) // '--x--x---'

console.log(set('a+x', 'a+r')) // 'a+rx'

console.log(set('4660', 'a-st')) // '0660'
github ehmicky / unix-permissions / examples / methods / set.js View on Github external
//   - then `node node_modules/unix-permissions/examples/methods/set.js`
// An online demo is also available at:
//   https://repl.it/@ehmicky/unix-permissions

'use strict'

// Ignore the following line: this is only needed for internal purposes.
require('../utils.js')

const { set } = require('unix-permissions')

console.log(set('---------', 'a+x')) // '--x--x--x'

console.log(set('---------', 'a+x', 'a+r')) // 'r-xr-xr-x'

console.log(set('--x--x--x', 'o-x')) // '--x--x---'

console.log(set('a+x', 'a+r')) // 'a+rx'

console.log(set('4660', 'a-st')) // '0660'
github ehmicky / unix-permissions / examples / methods / set.js View on Github external
//   https://repl.it/@ehmicky/unix-permissions

'use strict'

// Ignore the following line: this is only needed for internal purposes.
require('../utils.js')

const { set } = require('unix-permissions')

console.log(set('---------', 'a+x')) // '--x--x--x'

console.log(set('---------', 'a+x', 'a+r')) // 'r-xr-xr-x'

console.log(set('--x--x--x', 'o-x')) // '--x--x---'

console.log(set('a+x', 'a+r')) // 'a+rx'

console.log(set('4660', 'a-st')) // '0660'