Package Exports
- @supercharge/fs
- @supercharge/fs/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@supercharge/fs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Fs
Extended drop-in fs replacement for Node.js
Installation · Docs · Usage
Follow @marcuspoehls and @superchargejs for updates!
Introduction
The @supercharge/fs package provides an improved and extended fs implementation
- provides convenience methods like
isFile(path)orisDirectory(path) - useful methods, like
copy,ensureFile,ensureDir - based on fs-extra providing all native
fsmethods from Node.js - full async/await support
- aligned camelCase method naming, like
realPathinstead ofrealpath
Installation
npm i @supercharge/fsResources
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:
const Fs = require('@supercharge/fs')
await Fs.copy(src, dest)
await Fs.move(src, dest)
const size = await Fs.size(file)
// 3758 bytesHave 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 @supercharge · Twitter @superchargejs