resolver/resolve-fix.js
function findFiles(rootpath, patterns) {
		logger.trace("inside findFiles()");
		var patterns = patterns || ['**'];
		if(_.isString(patterns)) {
			patterns = [patterns];
		}
		var files = _.map(wrench.readdirSyncRecursive(rootpath), function(filename) {
			return path.posix.sep + replaceBackSlashes(filename);
		});
		var matchedFiles = match(files, patterns, {
			nocase: true,
			matchBase: true,
			dot: true,
		});
		return _.filter(matchedFiles, function(file) {
			return !fs.statSync(path.join(rootpath, file)).isDirectory();
		}) || [];

	}
function findFiles(rootpath, patterns) {
		logger.trace("inside findFiles()");
		var patterns = patterns || ['**'];
		if(_.isString(patterns)) {
			patterns = [patterns];
		}
		var files = _.map(wrench.readdirSyncRecursive(rootpath), function(filename) {
			return path.posix.sep + replaceBackSlashes(filename);
		});
		var matchedFiles = match(files, patterns, {
			nocase: true,
			matchBase: true,
			dot: true,
		});
		return _.filter(matchedFiles, function(file) {
			return !fs.statSync(path.join(rootpath, file)).isDirectory();
		}) || [];

	}
Find all files that match extension criteria

@param {string} rootpath - Absolute path of the directory from which file search will begin
@param {string[]|string} [patterns="**"] - Pattern(s) to be used when attempting to match files found
@returns {string[]} - Matched file paths