File-Hierarchy provides a JS-Hierarchy Node implementation, that turns a directory tree into a JS-Hierarchy tree using
Every directory entry is processed and its statistics data is gathered and saved. You can traverse the tree using
Unlike JS-Hierarchy, this module is not available for the browser (like, duh!).
Install the module using
npm install file-hierarchy --save
If you're using Typescript, you might want to add the following typings:
npm install @types/bluebird @types/loglevel @types/node --save-dev
new FileNode.scannew ScanOptions'/my/path'.then
const fileHierarchy =
See the API-docs for details.
To test and build this package, simply use grunt: