Skip to content

lochungtin/node-file-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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