# recursive-fs

> Asynchronous recursive file system operations

Latest version **2.1.0** (published 2020-03-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install recursive-fs
pnpm add recursive-fs
yarn add recursive-fs
bun add recursive-fs
```

Provides the commands `recursive-copy`, `recursive-delete`.

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2020-03-15 |
| First published | 2013-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 0 |
| Unpacked size | 9.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Simeon Velichkov |
| Maintainers | simov |
| Keywords | asynchronous, recursive, file, system, read, copy, remove, directory, cli |

## Links

- npm: https://www.npmjs.com/package/recursive-fs
- Repository: https://github.com/simov/recursive-fs
- Issues: https://github.com/simov/recursive-fs/issues
- npm.io page: https://npm.io/package/recursive-fs

## 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

- 2.1.0 (latest) — 2020-03-15
- 2.0.0 — 2020-03-14
- 1.1.2 — 2019-03-24
- 1.1.1 — 2019-01-26
- 1.1.0 — 2019-01-25
- 1.0.0 — 2016-11-16
- 0.1.4 — 2014-12-08
- 0.1.3 — 2013-02-24
- 0.1.2 — 2013-02-24
- 0.1.1 — 2013-02-22
- 0.1.0 — 2013-01-15

## README

# recursive-fs

[![npm-version]][npm] [![travis-ci]][travis] [![coveralls-status]][coveralls]

> _Asynchronous Recursive File System Operations_

## read

```js
var rfs = require('recursive-fs')

var path = require('path')
var directory = path.resolve(process.cwd(), process.argv[2])

;(async () => {
  try {
    var {dirs, files} = await rfs.read(directory)
    console.log(dirs)
    console.log(files)
    console.log('DONE!')
  }
  catch (err) {
    console.error(err)
  }
})()
```


## remove

```js
var rfs = require('recursive-fs')

var path = require('path')
var directory = path.resolve(process.cwd(), process.argv[2])

;(async () => {
  try {
    await rfs.remove(directory)
    console.log('DONE!')
  }
  catch (err) {
    console.error(err)
  }
})()
```


## copy

```js
var rfs = require('recursive-fs')

var path = require('path')
var source = path.resolve(process.cwd(), process.argv[2])
var destination = path.resolve(process.cwd(), process.argv[3])

;(async () => {
  try {
    await rfs.copy(source, destination)
    console.log('DONE!')
  }
  catch (err) {
    console.error(err)
  }
})()
```

---

## recursive-copy

```bash
npx recursive-copy 'path/to/source/directory' 'path/to/destination/directory'
```


## recursive-delete

```bash
npx recursive-delete 'path/to/directory'
```


  [npm-version]: https://img.shields.io/npm/v/recursive-fs.svg?style=flat-square (NPM Package Version)
  [travis-ci]: https://img.shields.io/travis/simov/recursive-fs/master.svg?style=flat-square (Build Status - Travis CI)
  [coveralls-status]: https://img.shields.io/coveralls/simov/recursive-fs.svg?style=flat-square (Test Coverage - Coveralls)

  [npm]: https://www.npmjs.com/package/recursive-fs
  [travis]: https://travis-ci.org/simov/recursive-fs
  [coveralls]: https://coveralls.io/github/simov/recursive-fs

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