How to use the fs-xattr.removeSync function in fs-xattr

To help you get started, we’ve selected a few fs-xattr 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 wisnuc / appifi / assets.js View on Github external
const XXHASH = require('xxhash')
  console.log('test xxhash: ' + XXHASH.hash(Buffer.from('hello'), 1234))
}

if (xattrBase64) {

  mkdirp.sync(dir)

  let decode = Buffer.from(xattrBase64.toString(), 'base64')
  fs.writeFileSync(path.join(dir, 'xattr.node'), decode)

  // test xattr
  const XATTR = require('fs-xattr')
  XATTR.setSync(dir, 'user.foo', 'bar')
  console.log('test xattr: ' + XATTR.getSync(dir, 'user.foo'))
  XATTR.removeSync(dir, 'user.foo')
}

function loadFont (base64, name) {

  if (base64) 
    return Buffer.from(base64, 'base64')
  else
    return fs.readFileSync('./public/stylesheets/Roboto-' + name + '-webfont.woff')
}

robotoThin = loadFont(robotoThinBase64, 'Thin')
robotoLight = loadFont(robotoLightBase64, 'Light')
robotoRegular = loadFont(robotoRegularBase64, 'Regular')
robotoMedium = loadFont(robotoMediumBase64, 'Medium')
robotoBold = loadFont(robotoBoldBase64, 'Bold')
robotoBlack = loadFont(robotoBlackBase64, 'Black')

fs-xattr

Node.js module for manipulating extended attributes.

MIT
Latest version published 4 years ago

Package Health Score

50 / 100
Full package analysis

Similar packages