npm.io
1.0.1 • Published 8 years agoCLI

fs-extended-attributes

Licence
MIT
Version
1.0.1
Deps
2
Size
199 kB
Vulns
0
Weekly
0
Stars
16
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)

fs-extended-attributes

Native module to do cross platform file attributes.

npm install fs-extended-attributes

Uses setxattr, getxattr on Linux / Mac and Alternate Data Streams on Windows (NTFS)

build status Build status

Usage

const fsx = require('fs-extended-attributes')

// assuming index.js exists as a file
fsx.set('./index.js', 'user.foo', 'hello', function () {
  fsx.get('./index.js', 'user.foo', console.log)
})

CLI

There is also a CLI

npm install -g fs-extended-attributes
fsx set ./index.js user.foo hello
fsx get ./index.js user.foo # prints hello

License

MIT