index.js
function (parent) {
	var elems = fs.readdirSync( parent ),
		d = {
			files : [],
			folders : []
		};

	// get files and folders paths
	elems.forEach( function (elem) {
		var el = parent + '/' + elem;
		if (!isDir( el )) {
			d.files.push( el );
		} else if (!fs.existsSync( el + '.json')) {
			// add folder only if has no namesake json
			d.folders.push( el );
		}
	});

	return d;
}
function (parent) {
	var elems = fs.readdirSync( parent ),
		d = {
			files : [],
			folders : []
		};

	// get files and folders paths
	elems.forEach( function (elem) {
		var el = parent + '/' + elem;
		if (!isDir( el )) {
			d.files.push( el );
		} else if (!fs.existsSync( el + '.json')) {
			// add folder only if has no namesake json
			d.folders.push( el );
		}
	});

	return d;
}
function ( parent ) { var elems = fs . readdirSync ( parent ) , d = { files : [ ] , folders : [ ] } ; // get files and folders paths elems . forEach ( function ( elem ) { var el = parent + '/' + elem ; if ( ! isDir ( el ) ) { d . files . push ( el ) ; } else if ( ! fs . existsSync ( el + '.json' ) ) { // add folder only if has no namesake json d . folders . push ( el ) ; } } ) ; return d ; }
get the paths of files and folders inside a folder
get the paths of files and folders inside a folder