# recursive-readdir-sync

> NodeJS library to recursively read a directory path's contents synchronously

Latest version **1.0.6** (published 2015-02-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install recursive-readdir-sync
pnpm add recursive-readdir-sync
yarn add recursive-readdir-sync
bun add recursive-readdir-sync
```

## 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 | 2015-02-27 |
| First published | 2015-02-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Jeremy Battle |
| Maintainers | complexcarb |
| Keywords | readdir, recursive, readdir, directory, sync, read, sync |

## Links

- npm: https://www.npmjs.com/package/recursive-readdir-sync
- Repository: https://github.com/battlejj/recursive-readdir-sync
- Issues: https://github.com/battlejj/recursive-readdir-sync/issues
- npm.io page: https://npm.io/package/recursive-readdir-sync

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 1.0.6 (latest) — 2015-02-27
- 1.0.5 — 2015-02-24
- 1.0.4 — 2015-02-23
- 1.0.3 — 2015-02-23
- 1.0.2 — 2015-02-20
- 1.0.1 — 2015-02-19
- 1.0.0 — 2015-02-19

## README

recursive-readdir-sync
======================
NodeJS library to recursively read a directory path's contents synchronously

A simple Node module for synchronously listing all files in a directory, or in any subdirectories.

It does not list directories themselves.

This library uses synchronous filesystem calls. That means this library uses **BLOCKING** calls. Keep that in mind
when using it.

Install
-------

```
npm install recursive-readdir-sync
```

Example
-------
```javascript
var recursiveReadSync = require('recursive-readdir-sync')
  , files
  ;

try {
  files = recursiveReadSync('/your/path/here');
} catch(err){
  if(err.errno === 34){
    console.log('Path does not exist');
  } else {
    //something unrelated went wrong, rethrow
    throw err;
  }
}

console.log('Files array:', files);

//loop over resulting files
for(var i = 0, len = files.length; i < len; i++){
  console.log('Found: %s', files[i]);
}
```

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