filetree-nodejs-ontech
v1.0.0
Published
This npm allows generate file tree, based in specific path.
Downloads
4
Readme
FileTree Ontech
This npm allows generate file tree, based in specific path.
#Usage example
const getFileTree = require('filetree-ontech');
const fileTree = getFileTree('./example');
Output Example
{
"path":"../example",
"name":"example",
"size":96,
"type":"directory",
"children":[
{
"path":"../example/dir1",
"name":"dir1",
"size":96,
"type":"directory",
"children":[
{
"path":"../example/dir1/file.txt",
"name":"file.txt",
"size":0,
"extension":".txt",
"type":"file"
}
]
}
]
}