1.0.0 • Published 5 years ago

filetree-nodejs-ontech v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

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"
            }
         ]
      }
   ]
}