# file-tree-walker-ts

> File tree walker written in TypeScript.

Latest version **2.0.3** (published 2023-12-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install file-tree-walker-ts
pnpm add file-tree-walker-ts
yarn add file-tree-walker-ts
bun add file-tree-walker-ts
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2023-12-21 |
| First published | 2020-04-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | o-su |
| Maintainers | o-su |
| Keywords | filesystem, TypeScript, files, find, walk, directory, recursive, traversal, directory tree |

## Links

- npm: https://www.npmjs.com/package/file-tree-walker-ts
- Repository: https://github.com/o-su/file-tree-walker-ts
- Issues: https://github.com/o-su/file-tree-walker-ts/issues
- npm.io page: https://npm.io/package/file-tree-walker-ts

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

- 2.0.3 (latest) — 2023-12-21
- 2.0.2 — 2021-04-12
- 2.0.1 — 2021-04-12
- 2.0.0 — 2021-04-12
- 1.0.0 — 2020-04-11

## README

# file-tree-walker-ts

File tree walker written in TypeScript.

## Installation

```bash
npm install --save file-tree-walker-ts
```

## Example Usage

```typescript
import { FileTreeWalker } from "file-tree-walker-ts";

new FileTreeWalker()
    .setAllowedFileTypes(["ts", "js"])
    .onDirectory((directoryPath: string, directoryName: string) => {
        console.log(directoryPath, directoryName);
    })
    .onFile((filePath: string, filename: string, fileExtension: string, content: string) => {
        console.log(filePath, filename, fileExtension, content);
    })
    .walk("path");
```

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