Async filesystem methods for Node.js
npm install @supercharge/fs
Extended drop-in fs replacement for Node.js
Installation ·
Docs ·
Usage
Follow @marcuspoehls and @superchargejs for updates!
@supercharge/fs package provides an improved and extended fs implementation
isFile(path) or isDirectory(path)
copy, ensureFile, ensureDir
fs methods from Node.js
realPath instead of realpath
npm i @supercharge/fs
`
Resources
- Documentation
Quick Usage Overview
Using @supercharge/fs is pretty straightforward. Install and import the package in your project and use the methods to interact with the filesystem.
For example, you may copy or move a file from src to dest or retrieve a file’s size:
`js
const Fs = require('@supercharge/fs')
await Fs.copy(src, dest)
await Fs.move(src, dest)
const size = await Fs.size(file)
// 3758 bytes
`
Have a look at the docs for this package to find more details on all supported methods.
Contributing
Do you miss a string function? We very much appreciate your contribution! Please send in a pull request 😊
1. Create a fork
2. Create your feature branch: git checkout -b my-feature
3. Commit your changes: git commit -am 'Add some feature'
4. Push to the branch: git push origin my-new-feature`