# files-tree

> For recursive query folder under all documents and file information

Latest version **1.0.8** (published 2017-08-11) · ISC license · 0 weekly downloads

## Install

```sh
npm install files-tree
pnpm add files-tree
yarn add files-tree
bun add files-tree
```

## 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.8 |
| Published | 2017-08-11 |
| First published | 2017-02-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | chenqf |
| Maintainers | chenqf |
| Keywords | fileList, fileTree, listTree, file-list, file-tree, list-tree, file, tree |

## Links

- npm: https://www.npmjs.com/package/files-tree
- Repository: https://github.com/chenqf/files-tree
- Homepage: https://github.com/chenqf/files-tree#readme
- Issues: https://github.com/chenqf/files-tree/issues
- npm.io page: https://npm.io/package/files-tree

## Dependencies (1)

- [md5](https://npm.io/package/md5.md) ^2.2.1

## 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.8 (latest) — 2017-08-11
- 1.0.7 — 2017-08-11
- 1.0.6 — 2017-03-29
- 1.0.5 — 2017-03-01
- 1.0.4 — 2017-03-01
- 1.0.3 — 2017-02-28
- 1.0.2 — 2017-02-28
- 1.0.1 — 2017-02-28
- 1.0.0 — 2017-02-28

## README

# files-tree
For recursive query folder under all documents and file information

## Installation:

```sh
npm install files-tree --save
```
## Usage:
```javascript
var util = require('files-tree'),
    path = './',
    tree = util.tree(path); //recursion
console.log(tree);

/**output**/
[
  {
    "path": "./index.js",
    "name": "index.js",
    "size": 3051,
    "directory": false, // Is directory
    "file": true    // Is file
  },
  {
    "path": "./package.json",
    "name": "package.json",
    "size": 662,
    "directory": false,
    "file": true
  },
  {
    "path": "./test",
    "name": "test",
    "size": 0,
    "directory": true,
    "file": false,
    "list": [   // All files in the folder
      {
        "path": "./test/index.js",
        "name": "index.js",
        "size": 261,
        "directory": false,
        "file": true
      }
    ]
  }
]
```

## API:
__list(path,[options])__
###### Export files in current folder
* `path` string, by default './'
* `options` object,specific filter and setting
* `options.suffix` string,defining a specific file suffix
* `options.ignore` string,file name or folder name ,ignore specific file or folder
* `options.md5` boolean,return the md5 value of the file

__tree(path,[options])__
###### In accordance with the tree structure of all directories and subdirectories in the file
* `path` string, by default './'
* `options` object,specific filter and setting
* `options.suffix` string,defining a specific file suffix
* `options.ignore` string,file name or folder name ,ignore specific file or folder
* `options.md5` boolean,return the md5 value of the file

__allFile(path,[options])__
###### Export files in all directories and subdirectories
* `path` string, by default './'
* `options` object,specific filter and setting
* `options.suffix` string,defining a specific file suffix
* `options.ignore` string,file name or folder name ,ignore specific file or folder
* `options.md5` boolean,return the md5 value of the file

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