Skip to content
/ z-tree Public

Creates an object representing a directory tree

License

Notifications You must be signed in to change notification settings

743v45/z-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

installation

$ git clone https://github.com/zyvas/z-tree.git
$ npm install 

Usage

tree.dirJSON('/tmp', function(err, data) {
  if (err) {
    console.log(err);
    return;
  }
  console.log(data);
});

// {
//   name: 'tmp',
//   type: 'directory',
//   child: [
//     {
//       name: 'mysql.sock',
//       type: 'file'
//     }, {
//       name: 'com.apple.launchd.xxxxxx',
//       type: 'directory',
//       child: [Object]
//     }, 
//     balabala...
//   ]
// }

About

Creates an object representing a directory tree

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published