Synopsis
Tree structure that represents the contents (files / folders) of a given start folder. Simply pass in a start folder and this module will return an object that you can use in a user interface to represent your files!
Requirements
Before building this project you will need the following resources:
- npm
Installation
npm install cs-file-tree --save
Usage
There are 2 functions exposed in this module (excluding the promise wrappers): 'getList' and 'getObject'. getList returns a list off all files and folders, and getObject returns the tree structure. See below for instructions.
Get List of Files / Folder
var tree = ;tree;
Get Tree Structure
var tree = ;tree;
Promise wrappers
For your convenience I have added wrappers to expose these functions as promises. See below for instructions.
Get List of Files / Folders (Promise)
var tree = ;tree
Get Tree Structure (Promise)
var tree = ;tree