1.1.4 • Published 4 years ago
walking-tree v1.1.4
Install
npm i walking-tree
yarn add walking-tree
Usage
The syntax for using the module is simple: walkingTree(path)
\
You can also use the options to improve its use using: walkingTree(path, [options])
You can use it with a simple variable:
const walkingTree = require("walking-tree");
const files = walkingTree("./local/");
console.log(files);
Options
filter
: RegExp
- Filter all files by name using Regex \
details
: Boolean
- See the contents of the files in detail \
folders
: Boolean
- Take folders also on the return of the module
Result
The result of the execution returns an array with the path of all files:
[
'.../local/notes.txt',
'.../local/utilites/codes/bar.js',
'.../local/utilites/codes/baz.js',
'.../local/utilites/codes/foo.js',
'.../local/utilites/images/bird.png',
'.../local/utilites/images/cat.png',
'.../local/utilites/videos/bird-meme.mp4'
]
Node version
The version most compatible with our package is Node 4 or higher!
Translation
Author
Marcos Dionisio |
---|