@supercharge/filesystem
v2.3.0
Filesystem
Async filesystem methods for Node.js
Installation · Docs · Usage
Follow @marcuspoehls and @superchargejs for updates!
Introduction
The @supercharge/filesystem
package provides async filesystem methods. It’s a wrapper around Node.js’ fs
package exposing only async methods. It provides a handful of additional methods, like copy
, move
, ensureFile
, size
, and tempFile
(there are actually a lot more).
Please notice: this package is not providing all of the native fs
methods from Node.js. It provides dozens of most used methods, fully async.
Installation
npm i @supercharge/filesystem
Docs
Find all the details for @supercharge/filesystem
in the extensive Supercharge docs.
Usage
Using @supercharge/filesystem
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:
const Fs = require('@supercharge/filesystem')
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 😊
- Create a fork
- Create your feature branch:
git checkout -b my-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request 🚀
License
MIT © Supercharge
superchargejs.com · GitHub @superchargejs · Twitter @superchargejs
Metadata
- MIT
- >=10
- Marcus Pöhls
- released 2/14/2021