Skip to content

rafaaseddik/fs-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FS Tree Tool

The node js app to get the structure of a directory in a programmatical way. It also displays the structure in the Windows command "tree" style.

Usage

const {FsTree} = require('fs-tree-tool');

FsTree.getDirectoryTree('..', 4).then(result=>{
    console.log(FsTree.stringifyTree(result," "));
})

Docs (in progress)

The library exposes two functions :

  • getDirectoryTree(path, depth) : this functions returns an object that describes the structures at the given path with the given depth. It returns a tree-like structure.
  • stringifyTree(tree): it takes the output of the getDirectoryTree result and return it in a human readable format string.

About

A node js library to get the arborescence of a directory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published