The includes in a fileset may be globs or they may be individual files.
This extracts all of the individual files and makes them absolute.

@param {!string} dirname
@param {!Array<{includes: Array<string>}>} fileset
@returns {!Array<string>}
437018
function filesFromFileSet (dirname, fileset) {
  if (!fileset.includes || !fileset.includes.length) {
    return [];
  }
  return fileset.includes
    .filter(include => !glob.hasMagic(include))
    .map(include => path.join(dirname, include));
}
728626
function(files) {
    var collection = {};
    files.forEach(function(file) {
        var filename = file.name;
        if (!collection.hasOwnProperty(filename) || collection[filename].version < file.version) {
            collection[filename] = file;
        }
    });
    return Object.keys(collection).map(function(name) {
        return collection[name];
    });
}
133498
function include(filename, absolute) {
            filename = absolute
                ? filename
                : __dirname + '/' + filename;
            var _program  = __program,  // Previous meta program
                _source   = __source,   // Previous source
                _filename = __filename, // Previous source file
                _dirname  = __dirname,  // Previous source directory
                _indent   = __;         // Previous indentation level
            var files;
            if (/(?:^|[^\\])\*/.test(filename)) {
                files = require("glob").sync(filename, { cwd : __dirname, nosort: true });
                files.sort(naturalCompare); // Sort these naturally (e.g. int8 < int16)
            } else {
                files = [filename];
            }
            files.forEach(function(file) {
                var source = require("fs").readFileSync(file)+"";
                __program = MetaScript.compile(indent(source, __));
                __source = source;
                __filename = file;
                __dirname = dirname(__filename);
                __runProgram();
                __program = _program;
                __source = _source;
                __filename = _filename;
                __dirname = _dirname;
                __ = _indent;
            });
        }
207065
function extractFolders( files ) {
    return files.data.files.map( function extractPath( file ) {
      return path.parse( file ).dir;
    }).filter( function extractUnique( path, index, array ) {
      return array.indexOf( path ) === index;
    });
  }
1001185
function getFiles(paths) {
  var result = fileUtil.getAllFiles(paths);

  var files = result.map(function (item) {
    return item.relativePath;
    // return path.join(item.basePath, item.relativePath);
  });

  return files;
}
1313998
protected String getJSIncludeFile(String fileName) {

        StringBuffer result = new StringBuffer(8);
        result.append("<script type=\"text/javascript\" src=\"");
        result.append(fileName);
        result.append("\"></script>");
        return result.toString();
    }
816005
private Collection<File> doListAllFiles(File rootDir,
                                            boolean includeDirectories) {
        Collection<File> result = new Stack<File>();
        File[] files = rootDir.listFiles();
        for (File f : files) {
            if (f.isDirectory()) {
                if (includeDirectories) {
                    result.add(f);
                }
                result.addAll(doListAllFiles(f, includeDirectories));
            } else if (f.isFile()) {
                result.add(f);
            }
        }
        return result;
    }
661292
public void setIncludes(String includes) {

        // Split the string into separate file globs.
        String[] globs = includes.split("[\\s,]+");

        // Loop over these globs and create dirsets from them.
        // Do not set the root directory until the task is
        // executed.
        for (String glob : globs) {
            DirSet dirset = new DirSet();
            dirset.setIncludes(glob);
            this.includes.add(dirset);
        }
    }
983716
public static function find($filename, $dirs = array())
    {
        if (empty($dirs)) {
            if ($filename = realpath($filename)) {
                return $filename;
            }
        } else {
            foreach ((array) $dirs as $dir) {
                $pathname = self::join($dir, $filename);
                if ($pathname = realpath($pathname)) {
                    return $pathname;
                }
            }
        }
        return false;
    }
1117701
function (data) {
      var include = function (path, includeData) {
        var d = utils.shallowCopy({}, data);
        if (includeData) {
          d = utils.shallowCopy(d, includeData);
        }
        return includeFile(path, opts)(d);
      };
      return fn.apply(opts.context, [data || {}, escapeFn, include, rethrow]);
    }
275316
def calc_dirs_with_files(sources)
      filemap = {}
      sources.keys.sort.reverse.each do |o|
        d = File.dirname(o)
        if filemap.include?(d)
          filemap[d] << o
        else
          filemap[d] = [o]
        end
      end
      return filemap
    end
61913
function includeServedOnly(files) {
	files = Object.assign({}, files);
	let oldIncluded = files.included;
	files.included = files.served
		// Don’t include the files that are included in the outer context
		.filter(file => oldIncluded.indexOf(file) === -1)
		// Don’t include this (or other) contexts
		.filter(file => !isIFrameHtml(file.path))
		// Don’t include files that were never included to begin with (before the framework ran)
		// FIXME: find the most specific applicable pattern first
		.filter(file => !nonIncludedFiles.some(pattern => minimatch(file.originalPath, pattern.pattern)))
		// Don’t include the reverse context (it is included by the `transform` function below)
		.filter(file => file.originalPath !== REVERSE_CONTEXT);
	return files;
}
157770
public static File[] listFiles(final File target, final List<Pattern> patterns, final boolean include) {
        if (patterns == null || patterns.isEmpty())
            return target.listFiles();

        return target.listFiles(new FilenameFilter() {

            @Override
            public boolean accept(File dir, String name) {
                for (Pattern pattern : patterns) {
                    Matcher matcher = pattern.matcher(name);
                    if (matcher.matches())
                        return include;
                }
                return !include;
            }

        });

    }
769081
function include(filePath, extraVars) {
    if(!pathIsAbsolute(filePath)){
      filePath = path.resolve(path.dirname(this.file), filePath);
    }

    var vars = {};
    for(var ii in this.vars){
      vars[ii] = this.vars[ii];
    }
    if(extraVars){
      for(var jj in extraVars){
        vars[jj] = extraVars[jj];
      }
    }
    return render(readFile(filePath, {encoding: 'utf8'}), vars, filePath);
  }
900415
function resolveInclude(name, filename) {
  var path = join(dirname(filename), name);
  var ext = extname(name);
  if (!ext) path += '.ejs';
  return path;
}
1062241
private List<String> scanFileSet(File sourceDirectory, FileSet fileSet) {
        final String[] emptyStringArray = {};

        DirectoryScanner scanner = new DirectoryScanner();

        scanner.setBasedir(sourceDirectory);
        if (fileSet.getIncludes() != null && !fileSet.getIncludes().isEmpty()) {
            scanner.setIncludes(fileSet.getIncludes().toArray(emptyStringArray));
        } else {
            scanner.setIncludes(DEFAULT_INCLUDES);
        }

        if (fileSet.getExcludes() != null && !fileSet.getExcludes().isEmpty()) {
            scanner.setExcludes(fileSet.getExcludes().toArray(emptyStringArray));
        }

        if (fileSet.isUseDefaultExcludes()) {
            scanner.addDefaultExcludes();
        }

        scanner.scan();

        return Arrays.asList(scanner.getIncludedFiles());
    }
204054
function contains(dirs, p) {
    if (!Array.isArray(dirs)) dirs = [dirs];
    return dirs.some(dir => {
      return indir(dir, p);
    });
  }