Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 575 Bytes

README.md

File metadata and controls

32 lines (22 loc) · 575 Bytes

Node File Tree

Simple file tree data structure coded for NodeJS

Install

Installing with npm npm i --save @enigmaoffline/node-file-tree

Usage

Importing

const FTree = require("github-fetch");

const ft = new FTree('./src');

ft.setIgnoreNodeModules(false);
ft.printTree();

ft.travel(
    (node, layer) => {
        // do something when file is reached
    },
    (node, layer) => {
        // do something when directory is reached
    }
);

LICENSE - MIT - Lo Chung Tin