https://github.com/dottorblaster/willfs
My take on promisified fs read/write in NodeJS
https://github.com/dottorblaster/willfs
Last synced: 5 months ago
JSON representation
My take on promisified fs read/write in NodeJS
- Host: GitHub
- URL: https://github.com/dottorblaster/willfs
- Owner: dottorblaster
- License: mit
- Created: 2017-06-16T16:02:12.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-16T16:35:31.000Z (about 9 years ago)
- Last Synced: 2025-02-10T20:04:48.560Z (over 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# willfs
My take on promisified fs read/write in NodeJS
## Examples
Short examples follow:
```js
const willfs = require('willfs')
willfs.read('/home/blaster/example.txt').then((data) => {
// Do something with your data
}).catch(() => {
// Error management here in the catch
})
```
And you can write a file:
```js
const willfs = require('willfs')
willfs.write('/home/blaster/example.txt', 'Hello!').then(() => {
// Logic follows
}).catch(() => {
// Error management here too
})
```