# readfolder-recursive

> Read Folder Recursive Accepts the path of a folder and returns all the files included in the folder and its subfolders. npm i readfolder-recursive Arguments 1. The path of the folder (required) 2.

Latest version **1.0.6** (published 2022-06-07) · ISC license · 0 weekly downloads

## Install

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

## 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 | 1.0.6 |
| Published | 2022-06-07 |
| First published | 2022-06-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | christopher_far |

## Links

- npm: https://www.npmjs.com/package/readfolder-recursive
- npm.io page: https://npm.io/package/readfolder-recursive

## Dependencies (1)

- [path](https://npm.io/package/path.md) ^0.12.7

## Recent versions

- 1.0.6 (latest) — 2022-06-07
- 1.0.5 — 2022-06-07
- 1.0.4 — 2022-06-06
- 1.0.3 — 2022-06-06
- 1.0.2 — 2022-06-06
- 1.0.1 — 2022-06-06
- 1.0.0 — 2022-06-06

## README

<b>Read Folder Recursive</b><br>
Accepts the path of a folder and returns all the files included in the folder and its subfolders.<br>
<br>
<b>npm i readfolder-recursive</b><br>
<br>
<b>Arguments</b><br>
1. The path of the folder (required)<br>
2. An array with file extensions [".png", ".mp4"]. Only the files that their extensions matches would be returned. An empty array will return all the files. (optional)<br>
3. An array with file extensions to ignore. The files with these extnesions would not be returned. (optional)<br>
<i>****If an extension is include in both arrays, files with this extension would not be returned.</i><br>

<b>Usage - Returns a Promise</b><br>

<b>Example 1</b><br>
const readFolderRecursive = require('readfolder-recursive');<br>
const path = "C:\Users\myUsername\Desktop\myFolder";<br>
const extensionsToInclude = [];  //An empty array means include all the files.<br>
const extensionsToIgnore = [".mp4"];   //Ignore all the .mp4 files.<br>
const files = await readFolderRecursive(path, extensionsToInclude, extensionsToIgnore);<br>
<b>It will return all the files from the folder <i>"C:\Users\myUsername\Desktop\myFolder"</i> apart from the <i>.mp4 files</i></b>
<br>
<br>
<b>Example 2</b><br>
const readFolderRecursive = require('readfolder-recursive');<br>
const path = require('path');<br>
const folder = path.join('__dirname', 'myFolder');<br>
readFolderRecursive(folder, [], [])<br>
.then((files)=>{ console.log(files) })<br>
.catch((e)=>{ console.log(e) });<br>
<b>It will return all the files from the folder <i>"myFolder"</i></b>

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