# @wessberg/filesaver

> A Promise-based class that can save/remove files to/from disk and make folders recursively.

Latest version **1.0.11** (published 2020-04-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @wessberg/filesaver
pnpm add @wessberg/filesaver
yarn add @wessberg/filesaver
bun add @wessberg/filesaver
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.11 |
| Published | 2020-04-06 |
| First published | 2017-06-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=8.0.0 |
| Dependencies | 3 |
| Unpacked size | 22.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | wessberg |
| Keywords | file, save, promise, fs, node, saving, io, disk |

## Links

- npm: https://www.npmjs.com/package/@wessberg/filesaver
- Repository: https://github.com/wessberg/filesaver
- Homepage: https://github.com/wessberg/filesaver#readme
- Issues: https://github.com/wessberg/filesaver/issues
- npm.io page: https://npm.io/package/@wessberg/filesaver

## Dependencies (3)

- [tslib](https://npm.io/package/tslib.md) ^1.11.1
- [mkdirp](https://npm.io/package/mkdirp.md) ^1.0.4
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.0.11 (latest) — 2020-04-06
- 1.0.10 — 2020-01-29
- 1.0.9 — 2020-01-29
- 1.0.8 — 2018-04-09
- 1.0.7 — 2018-04-09
- 1.0.6 — 2018-03-31
- 1.0.5 — 2018-02-03
- 1.0.3 — 2017-08-20
- 1.0.2 — 2017-08-19
- 1.0.1 — 2017-06-12
- 1.0.0 — 2017-06-09

## README

<!-- SHADOW_SECTION_LOGO_START -->

<!-- SHADOW_SECTION_LOGO_END -->

<!-- SHADOW_SECTION_DESCRIPTION_SHORT_START -->

> A Promise-based class that can save/remove files to/from disk and make folders recursively.

<!-- SHADOW_SECTION_DESCRIPTION_SHORT_END -->

<!-- SHADOW_SECTION_BADGES_START -->

<a href="https://npmcharts.com/compare/%40wessberg%2Ffilesaver?minimal=true"><img alt="Downloads per month" src="https://img.shields.io/npm/dm/%40wessberg%2Ffilesaver.svg"    /></a>
<a href="https://www.npmjs.com/package/%40wessberg%2Ffilesaver"><img alt="NPM version" src="https://badge.fury.io/js/%40wessberg%2Ffilesaver.svg"    /></a>
<a href="https://david-dm.org/wessberg/filesaver"><img alt="Dependencies" src="https://img.shields.io/david/wessberg%2Ffilesaver.svg"    /></a>
<a href="https://github.com/wessberg/filesaver/graphs/contributors"><img alt="Contributors" src="https://img.shields.io/github/contributors/wessberg%2Ffilesaver.svg"    /></a>
<a href="https://github.com/prettier/prettier"><img alt="code style: prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"    /></a>
<a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg"    /></a>
<a href="https://www.patreon.com/bePatron?u=11315442"><img alt="Support on Patreon" src="https://img.shields.io/badge/patreon-donate-green.svg"    /></a>

<!-- SHADOW_SECTION_BADGES_END -->

<!-- SHADOW_SECTION_DESCRIPTION_LONG_START -->

## Description

<!-- SHADOW_SECTION_DESCRIPTION_LONG_END -->

## DISCLAIMER

This library will be deprecated. There are better alternatives built directly
into the `fs` module now. Use that instead.

<!-- SHADOW_SECTION_FEATURE_IMAGE_START -->

<!-- SHADOW_SECTION_FEATURE_IMAGE_END -->

<!-- SHADOW_SECTION_TOC_START -->

## Table of Contents

- [Description](#description)
- [DISCLAIMER](#disclaimer)
- [Table of Contents](#table-of-contents)
- [Install](#install)
  - [npm](#npm)
  - [Yarn](#yarn)
  - [pnpm](#pnpm)
- [Usage](#usage)
- [Contributing](#contributing)
- [Maintainers](#maintainers)
- [Backers](#backers)
  - [Patreon](#patreon)
- [License](#license)

<!-- SHADOW_SECTION_TOC_END -->

<!-- SHADOW_SECTION_INSTALL_START -->

## Install

### npm

```
$ npm install @wessberg/filesaver
```

### Yarn

```
$ yarn add @wessberg/filesaver
```

### pnpm

```
$ pnpm add @wessberg/filesaver
```

<!-- SHADOW_SECTION_INSTALL_END -->

<!-- SHADOW_SECTION_USAGE_START -->

## Usage

<!-- SHADOW_SECTION_USAGE_END -->

```typescript
const fileSaver = new FileSaver();

// Just a simple Promise-based async I/O method.
await fileSaver.save("some_file.ts", "hello world!");

// A recursive mkDir (like mkDir -f).
await fileSaver.makeDirectory("/foo/bar/baz");
```

<!-- SHADOW_SECTION_CONTRIBUTING_START -->

## Contributing

Do you want to contribute? Awesome! Please follow [these recommendations](./CONTRIBUTING.md).

<!-- SHADOW_SECTION_CONTRIBUTING_END -->

<!-- SHADOW_SECTION_MAINTAINERS_START -->

## Maintainers

| <a href="mailto:frederikwessberg@hotmail.com"><img alt="Frederik Wessberg" src="https://avatars2.githubusercontent.com/u/20454213?s=460&v=4" height="70"   /></a>                                                                |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Frederik Wessberg](mailto:frederikwessberg@hotmail.com)<br><strong>Twitter</strong>: [@FredWessberg](https://twitter.com/FredWessberg)<br><strong>Github</strong>: [@wessberg](https://github.com/wessberg)<br>_Lead Developer_ |

<!-- SHADOW_SECTION_MAINTAINERS_END -->

<!-- SHADOW_SECTION_BACKERS_START -->

## Backers

| <a href="https://usebubbles.com"><img alt="Bubbles" src="https://uploads-ssl.webflow.com/5d682047c28b217055606673/5e5360be16879c1d0dca6514_icon-thin-128x128%402x.png" height="70"   /></a> |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Bubbles](https://usebubbles.com)<br><strong>Twitter</strong>: [@use_bubbles](https://twitter.com/use_bubbles)                                                                              |

### Patreon

<a href="https://www.patreon.com/bePatron?u=11315442"><img alt="Patrons on Patreon" src="https://img.shields.io/endpoint.svg?url=https://shieldsio-patreon.herokuapp.com/wessberg"  width="200"  /></a>

<!-- SHADOW_SECTION_BACKERS_END -->

<!-- SHADOW_SECTION_LICENSE_START -->

## License

MIT © [Frederik Wessberg](mailto:frederikwessberg@hotmail.com) ([@FredWessberg](https://twitter.com/FredWessberg)) ([Website](https://github.com/wessberg))

<!-- SHADOW_SECTION_LICENSE_END -->

---
_Source: https://npm.io/package/@wessberg/filesaver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
