index.js
function stat(dir, files, cb) {
  var batch = new Batch();

  batch.concurrency(10);

  files.forEach(function(file){
    batch.push(function(done){
      fs.stat(join(dir, file), function(err, stat){
        if (err && err.code !== 'ENOENT') return done(err);

        // pass ENOENT as null stat, not error
        done(null, stat || null);
      });
    });
  });

  batch.end(cb);
}
function stat(dir, files, cb) {
  var batch = new Batch();

  batch.concurrency(10);

  files.forEach(function(file){
    batch.push(function(done){
      fs.stat(join(dir, file), function(err, stat){
        if (err && err.code !== 'ENOENT') return done(err);

        // pass ENOENT as null stat, not error
        done(null, stat || null);
      });
    });
  });

  batch.end(cb);
}
function stat ( dir , files , cb ) { var batch = new Batch ( ) ; batch . concurrency ( 10 ) ; files . forEach ( function ( file ) { batch . push ( function ( done ) { fs . stat ( join ( dir , file ) , function ( err , stat ) { if ( err && err . code !== 'ENOENT' ) return done ( err ) ; // pass ENOENT as null stat, not error done ( null , stat || null ) ; } ) ; } ) ; } ) ; batch . end ( cb ) ; }
Stat all files and return array of stat
in same order.
Stat all files and return array of stat in same order .