# list-directory-contents

> Get the contents of a directory recursively (like ls -R)

Latest version **0.0.3** (published 2014-07-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install list-directory-contents
pnpm add list-directory-contents
yarn add list-directory-contents
bun add list-directory-contents
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2014-07-25 |
| First published | 2014-07-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | mikermcneil |
| Maintainers | balderdashy |
| Keywords | ls, ls -r, recursive ls, fs, dir, lstat, recursive stat, lstat, list files |

## Links

- npm: https://www.npmjs.com/package/list-directory-contents
- Repository: https://github.com/mikermcneil/list-directory-contents
- Issues: https://github.com/mikermcneil/list-directory-contents/issues
- npm.io page: https://npm.io/package/list-directory-contents

## Dependencies (1)

- [walker](https://npm.io/package/walker.md) ~1.0.6

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

- 0.0.3 (latest) — 2014-07-25
- 0.0.2 — 2014-07-23
- 0.0.1 — 2014-07-23

## README

# list-directory-contents

Implements `ls -R` for Node.js.

## Installation

```sh
$ npm install list-directory-contents
```

## Usage

```javascript
var ls = require('list-directory-contents');

ls('./', function (err, tree) {
  
  // NOTE:
  // everything ending in `/` in the output below is a path to a directory
  // all other paths are to files
  
  
  // `tree` =>
  [
    'index.js',
    'README',
    'package.json',
    'CONTRIBUTING.md',
    'node_modules/',

    'node_modules/lodash/',
    'node_modules/async/',
    'node_modules/fs-extra/',

    'node_modules/fs-extra/index.js',
    'node_modules/fs-extra/lib/',
    'node_modules/fs-extra/node_modules/'
  ];
  
});
```

## Why?

This module is merely a convenience; a thin wrapper for [walker](https://github.com/daaku/nodejs-walker).  It presents a minimalist API for the most basic task you're likely to get up to: getting all the things in a directory, all the things in those things, and so forth.  @daaku did all the hard work :)

For more advanced use cases like built-in file vs. dir parsing, fetching `lstat` metadata, or controlling the universe mind bullets, please use [walker](https://github.com/daaku/nodejs-walker) directly.  See https://github.com/jprichardson/node-fs-extra/issues/63#issuecomment-49733873 for ergaleígony.


## License

MIT &copy; Mike McNeil 2014

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