file-tree-walker-ts
v2.0.3
Published
File tree walker written in TypeScript.
Downloads
37
Maintainers
Readme
file-tree-walker-ts
File tree walker written in TypeScript.
Installation
npm install --save file-tree-walker-ts
Example Usage
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");