This module helps you to find all the directories and files under the given target path with their full paths synchronously. To retrieve details asynchronously please use path-contents-asynch
For any clarifications please contact Ishan
npm install path-contents
var pathContent = require('path-contents');
var contents = pathContent.getAllContents("views");
console.log(contents);
//to display all the files
console.log('Files '+ contents.files);
//to display all folder and subfolders
console.log('Directories '+ contents.dirs);
npm test