code: function readdir( dir ) {
  	var promise = new Promise() ;
  
  	if ( dir[ dir.length - 1 ] !== '/' ) { dir += '/' ; }
  
  	fs.readdir( dir , ( error , files ) => {
  
  		if ( error ) { promise.reject( error ) ; return ; }
  
  		Promise.map( files , file => {
  			return new Promise( ( resolve , reject ) => {
  				fs.lstat( dir + file , ( error_ , stats ) => {
  					if ( error_ ) { reject( error_ ) ; return ; }
  					if ( stats.isDirectory() ) { file += '/' ; }
  					resolve( file ) ;
  				} ) ;
  			} ) ;
  		} )
  			.toPromise( promise ) ;
  	} ) ;
  
  	return promise ;
  }
docs: Like fs.readdir(), but performs fs.stat() for each file in order to add a '/' to directories