Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/supercharge/fs
Extended `fs` drop-in replacement for Node.js
https://github.com/supercharge/fs
async async-await filesystem fs nodejs supercharge
Last synced: 3 days ago
JSON representation
Extended `fs` drop-in replacement for Node.js
- Host: GitHub
- URL: https://github.com/supercharge/fs
- Owner: supercharge
- License: mit
- Created: 2020-02-09T05:24:10.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-03-16T03:46:58.000Z (8 months ago)
- Last Synced: 2024-11-08T13:05:28.985Z (6 days ago)
- Topics: async, async-await, filesystem, fs, nodejs, supercharge
- Language: JavaScript
- Homepage: https://superchargejs.com/docs/filesystem
- Size: 108 KB
- Stars: 18
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
Fs
Extended drop-infs
replacement for Node.js
Installation ·
Docs ·
Usage
Follow @marcuspoehls and @superchargejs for updates!
---
## Introduction
The `@supercharge/fs` package provides an improved and extended [`fs`](https://nodejs.org/dist/latest-v12.x/docs/api/fs.html) implementation- provides convenience methods like `isFile(path)` or `isDirectory(path)`
- useful methods, like `copy`, `ensureFile`, `ensureDir`
- based on [fs-extra](https://github.com/jprichardson/node-fs-extra) providing all native `fs` methods from Node.js
- full async/await support
- aligned camelCase method naming, like `realPath` instead of `realpath`## Installation
```
npm i @supercharge/fs
```## Resources
- [Documentation](https://superchargejs.com/docs/filesystem)## 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](https://superchargejs.com/docs/filesystem) 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](https://superchargejs.com)---
> [superchargejs.com](https://superchargejs.com) ·
> GitHub [@supercharge](https://github.com/supercharge/) ·
> Twitter [@superchargejs](https://twitter.com/superchargejs)