npm i -S directory-tree
var dirTree = ;var tree = ;
And you can also filter by extensions:
var dirTree = ;var filteredTree = ;
This will take a directory tree:
photos ├── summer │ └── june │ └── windsurf.jpg └── winter └── january ├── ski.png └── snowboard.jpg
And return a js object:
Device, FIFO and socket files are ignored.
Files to which the user does not have permissions are included in the directory tree, however, directories to which the user does not have permissions, along with all of its contained files, are completely ignored.
To run tests go the package root in your CLI and run,
$ npm test
Make sure you have the dev dependcies installed (e.g.
npm install .)
Check out version
0.1.1 if you need support for older versions of node.