@reliverse/fs is a utility library that wraps the Node.js native fs
module and fs-extra package, providing enhanced file system functionalities. This package is part of the broader @reliverse/addons
ecosystem.
Note: This project currently focuses on adding custom utilities (which use fs-extra
and pathe
), rather than re-exporting or modifying existing functionality from fs
or fs-extra
.
For more detailed usage instructions, API documentation, and examples, please visit the Reliverse Docs website. If you find that the page for this library is missing, please notify us or consider contributing to add it.
To install this package, run:
pnpm add @reliverse/fs@latest
or with Bun:
bun add @reliverse/fs@latest
To use @reliverse/fs
, ensure that your project is set up as an ES module by including "type": "module"
in your package.json
file. Since this package is structured as an ES module, you'll need to use import
statements instead of require
.
The library primarily relies on the async versions of fs
functions, so you need to add the await
keyword before the utils from our library.
Here's an example of how to import and use a function from this package:
import { fileExists } from "@reliverse/fs";
const someFile = "path/to/file.ts";
export async function checkFile() {
await fileExists(someFile);
}
Please refer to the source files located in the src
folder to learn about the currently implemented functions.
This package adopts the ES module format, with files compiled to dist/.js
(formerly known as dist/.mjs
). This approach aligns with the Node.js team's recent recommendations, encouraging the JavaScript/TypeScript community to transition to the ES module standard. If your project still requires CommonJS (CJS) support, you may fork this repository and modify the build process to generate dist/.cjs
files. For guidance or community support, join the Reliverse Discord community.
If you encounter any issues, need help, or want to contribute, you can:
- Join the Reliverse Discord community to ask questions and engage with other users and developers.
- For usage instructions, API documentation, and examples, please visit the Reliverse Docs website.
- Report bugs or suggest features by opening an issue on our GitHub repository.
Love using this project? If you find it useful, Iβd greatly appreciate a cup of coffee! By supporting this project, you'll gain access to Reliverse Pro, exclusive access to @reliverse/addons-pro, private repositories, pre-release downloads, and even the ability to influence projects planning. Click on the donation platforms below to learn more. Thank you all for your support!
We're Growing Fast! A Huge Thanks to All Our Supporters!
Developing something as ambitious as @reliverse/addons takes a huge amount of time, especially since the project is primarily developed by one person. The development could be significantly accelerated by bringing on additional developers. Therefore, @blefnk (Nazar Kornienko), the author of this project, would be immensely grateful to anyone who can contribute financially in any amount. A big thank you in advance to everyone who supports this effort!
Visit the "Donate to Relivator" page to see our current donors and learn more.
π GitHub Sponsors π©΅ PayPal 𧑠Patreon π Buy Me a Coffee π©· Ko-fi
We welcome contributions! If youβd like to contribute to the development of this package, please follow these steps:
- If you are a beginner: Familiarize yourself with Git by following The Detailed Git Guide created by @blefnk and @reliverse.
- Fork this repository.
- Create a new branch for your feature (e.g.
git checkout -b feature-branch
). - Make your changes in the new branch.
- Commit your changes with a descriptive message (e.g.
git commit -m 'Add new feature'
). - Push your changes to your branch (e.g.
git push origin feature-branch
). - Open a pull request for our review.
Please ensure that your code follows the existing code style and includes appropriate tests. Your code should successfully pass the pnpm appts
command.
This project is developed by Reliverse and @blefnk (Nazar Kornienko) and is licensed under the MIT License. For more information, please refer to the LICENSE file.