src/clusterpost-execution/executionserver.methods.js
function(dir, files){		
		fs.readdirSync(dir).forEach(function(file){
			try{
				var current = path.join(dir, file);
				var stat = fs.statSync(current);
				if (stat && stat.isDirectory()) {
					getAllFiles(current, files);
				}else {
				    files.push(current);
				}
			}catch(e){
				console.error(e);
			}
        });
	}
function(dir, files){		
		fs.readdirSync(dir).forEach(function(file){
			try{
				var current = path.join(dir, file);
				var stat = fs.statSync(current);
				if (stat && stat.isDirectory()) {
					getAllFiles(current, files);
				}else {
				    files.push(current);
				}
			}catch(e){
				console.error(e);
			}
        });
	}
function ( dir , files ) { fs . readdirSync ( dir ) . forEach ( function ( file ) { try { var current = path . join ( dir , file ) ; var stat = fs . statSync ( current ) ; if ( stat && stat . isDirectory ( ) ) { getAllFiles ( current , files ) ; } else { files . push ( current ) ; } } catch ( e ) { console . error ( e ) ; } } ) ; }
Read all files in directory and return an array with all files
Read all files in directory and return an array with all files