lib/index.js
/**
 * Recursively read a directory, returning a list of the files therein.
 *
 * @param {string} fp Filepath of the directory.
 * @param {function} callback
 */
Recursively read a directory, returning a list of the files therein.
@param {string} fp Filepath of the directory.
@param {function} callback
Recursively read a directory returning a list of the files therein . @param { string } fp Filepath of the directory . @param { function } callback
function readDir (fp, callback) {
  glob('**/*.mp3', { cwd: fp }, function (err, files) {
    if (err) return callback.call(null, err);
    callback.call(null, null, files.map(function (file) {
      return path.resolve(fp, file);
    }));
  });
}
function readDir ( fp , callback ) { glob ( '**/*.mp3' , { cwd : fp } , function ( err , files ) { if ( err ) return callback . call ( null , err ) ; callback . call ( null , null , files . map ( function ( file ) { return path . resolve ( fp , file ) ; } ) ) ; } ) ; }
Recursively read a directory, returning a list of the files therein.
Recursively read a directory returning a list of the files therein .