@enigmaoffline/node-file-tree

Simple File Tree for NodeJS


Keywords
FileTree, Tree, File, FileSystem
License
MIT
Install
npm install @enigmaoffline/node-file-tree@1.0.0

Documentation

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
    }
);