# file-tree-sync

> A function that iterates recursively through a directory structure and returns it as a normal array. Supports glob syntax to ignore files if needed.

Latest version **0.0.0** (published 2013-12-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install file-tree-sync
pnpm add file-tree-sync
yarn add file-tree-sync
bun add file-tree-sync
```

## 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.0 |
| Published | 2013-12-07 |
| First published | 2013-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Arnor Heidar Sigurdsson |
| Maintainers | arnorhs |
| Keywords | dir, directory, tree, structure, sync |

## Links

- npm: https://www.npmjs.com/package/file-tree-sync
- Repository: https://github.com/arnorhs/file-tree-sync
- Issues: https://github.com/arnorhs/file-tree-sync/issues
- npm.io page: https://npm.io/package/file-tree-sync

## Dependencies (1)

- [minimatch](https://npm.io/package/minimatch.md) ~0.2.12

## Alternatives

- [promise-throttle](https://npm.io/package/promise-throttle.md) — 44.2K weekly downloads
- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads

## Recent versions

- 0.0.0 (latest) — 2013-12-07

## README

# file-tree-sync

A function that iterates recursively through a directory structure and returns it as a normal array. Supports glob syntax to ignore files if needed.

### Usage

Installation:
```sh
$ npm install file-tree-sync
```

Use in your code:
```
var treeify = require('file-tree-sync');

var myTree = treeify(process.cwd(), ['.*']);
```

It returns an array that looks like this:
```json
[
  {
    "name": "<name of file>",
    "fullpath": "<full path of file>",
    "relativePath": "<path relative to the directory you specified>"
    "files": [....] // array of the same type of object
  },
  ...
]
```

### TODO
- Handle file permission errors
- An async version could be useful for other use cases than I had in mind initially
- Write more tests

### License
MIT license

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