@supercharge/filesystemdeprecated

Async filesystem methods for Node.js

Usage no npm install needed!

<script type="module">
  import superchargeFilesystem from 'https://cdn.skypack.dev/@supercharge/filesystem';
</script>

README



Filesystem

Async filesystem methods for Node.js


Installation · Docs · Usage



Latest Version Monthly downloads

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 😊

  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
  5. Submit a pull request 🚀

License

MIT © Supercharge


superchargejs.com  ·  GitHub @superchargejs  ·  Twitter @superchargejs