https://github.com/wdalmut/file-attributes
Simple per-file attributes system
https://github.com/wdalmut/file-attributes
attributes file file-attributes library
Last synced: over 1 year ago
JSON representation
Simple per-file attributes system
- Host: GitHub
- URL: https://github.com/wdalmut/file-attributes
- Owner: wdalmut
- Created: 2017-03-05T09:40:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-05T15:50:55.000Z (over 9 years ago)
- Last Synced: 2025-02-25T04:34:29.827Z (over 1 year ago)
- Topics: attributes, file, file-attributes, library
- Language: JavaScript
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Per file attributes
Just a simple per-file attributes system
```js
var kv = require('file-attributes');
var attributes = kv("/path/to/disk"); // where to store
attributes.set("/home/user/documents/file.txt", JSON.stringify({
ready: true,
signed: false
}), function(err, data) {
// on success/failure
});
attributes.get("/home/user/documents/file.txt", (err, data) => {
if (err) {
// fail
}
data = JSON.parse(data);
});
```