lib/dirio.js
function _folderRead(item, stat, dirpath, callback, err, files) {
  if (err) return callback(err);
  async.map(
    files,
    _readChild.bind(null, stat, dirpath),
    _childrenRead.bind(null, item, callback)
  );
}
function _folderRead(item, stat, dirpath, callback, err, files) {
  if (err) return callback(err);
  async.map(
    files,
    _readChild.bind(null, stat, dirpath),
    _childrenRead.bind(null, item, callback)
  );
}
function _folderRead ( item , stat , dirpath , callback , err , files ) { if ( err ) return callback ( err ) ; async . map ( files , _readChild . bind ( null , stat , dirpath ) , _childrenRead . bind ( null , item , callback ) ) ; }
Ensures each child of the read directory may provide its data.
@param {Object} item - Object that is supposed to be updated with
discovered data.
@param {Function} stat - Function of fs module fs.stat or fs.lstat.
@param {String} dirpath - Path of the read directory on file system.
@param {Function} callback - Callback that expects a possible error
and array of child data.
@param {*} err - Possible error passed by caller.
@param {String[]} files - List of file names contained in the
directory.
Ensures each child of the read directory may provide its data .