{{{ getImplicitCombinedFiles()
171751
protected function getImplicitCombinedFiles(
        array $filesToCheck,
        array $files
    ) {
        $dependsInfo = $this->getDependsInfo();

        // get depends
        $depends = array();
        foreach ($filesToCheck as $file => $info) {
            if (isset($dependsInfo[$file])) {
                $depends = array_merge($depends, $dependsInfo[$file]);
            }
        }

        // get depends not in the set
        $depends = array_diff($depends, array_keys($files));

        // check sub-dependencies to see any are in the set
        $implicitFiles = array();
        foreach ($depends as $file) {
            if (isset($dependsInfo[$file])) {
                $subDepends = array_intersect(
                    $dependsInfo[$file],
                    array_keys($files)
                );
                if (count($subDepends) > 0
                    && !isset($implicitFiles[$file])
                ) {
                    $files[$file] = array(
                        'explicit' => false,
                    );
                    $implicitFiles[$file] = $file;
                }
            }
        }

        // if implicit files were added, check those
        if (count($implicitFiles) > 0) {
            $files = $this->getImplicitCombinedFiles(
                $implicitFiles,
                $files
            );
        }

        return $files;
    }
353765
function () {
      var fileContent = self._readFileSync();

      return defaults((fileContent.instances || {})[this._id], self._options.instanceDefaults);
    }
227840
protected int checkForChangedIncludeFiles(final Map<String, TargetInfo> targets) {
    int potentialTargets = 0;
    int definiteTargets = 0;
    Iterator<TargetInfo> targetEnum = targets.values().iterator();
    while (targetEnum.hasNext()) {
      final TargetInfo target = targetEnum.next();
      if (!target.getRebuild()) {
        potentialTargets++;
      } else {
        definiteTargets++;
      }
    }
    //
    // If there were remaining targets that
    // might be out of date
    //
    if (potentialTargets > 0) {
      log("Starting dependency analysis for " + Integer.toString(potentialTargets) + " files.");
      final DependencyTable dependencyTable = new DependencyTable(this._objDir);
      try {
        dependencyTable.load();
      } catch (final Exception ex) {
        log("Problem reading dependencies.xml: " + ex.toString());
      }
      targetEnum = targets.values().iterator();
      while (targetEnum.hasNext()) {
    	  final TargetInfo target = targetEnum.next();
    	  if (!target.getRebuild() && dependencyTable.needsRebuild(this, target, this.dependencyDepth)) {
    		  target.mustRebuild();
    	  }
      }
      dependencyTable.commit(this);
    }
    //
    // count files being rebuilt now
    //
    int currentTargets = 0;
    targetEnum = targets.values().iterator();
    while (targetEnum.hasNext()) {
      final TargetInfo target = targetEnum.next();
      if (target.getRebuild()) {
        currentTargets++;
      }
    }
    if (potentialTargets > 0) {
      log(Integer.toString(potentialTargets - currentTargets + definiteTargets) + " files are up to date.");
      log(Integer.toString(currentTargets - definiteTargets) + " files to be recompiled from dependency analysis.");
    }
    log(Integer.toString(currentTargets) + " total files to be compiled.");
    return currentTargets;
  }
734221
function (files) {
    if (!_.isArray(files)) files = [files];
    return _.chain(files).map(fss.target).map(function (f) {
        if (!fss.directoryExists(f)) return f;
        return fss.allTargetFilePaths(f);
    }).flatten().uniq().reject(fss.isDotFile).map(pathSuffix).value();
}
430761
function copyReadmeFiles() {
    const resolvedSrcReadmePaths = path.resolve(rootDir, srcReadmePaths);

    glob(resolvedSrcReadmePaths, void(0), function(error, files) {
        files.forEach((filePath) => {
        const destReadmePath = filePath.replace(/(\bsrc\b)(?!.*\1)/, destDir);
            fs.copyFileSync(filePath, destReadmePath);
        });
    });
}
1003796
function getNotLoadPackedFiles(page, packedFiles, loadPackeFiles) {
    var existedMap = {};
    loadPackeFiles.forEach(function(item) {
        existedMap[item.id] = true;
    });

    var notExisteds = [];
    packedFiles.forEach(function(item) {
        var pkg = item.pkg;
        var host = item.host;
        if (!existedMap[pkg.id] && (host === page || host == null)) {
            notExisteds.push(pkg);
        }
    });

    return notExisteds;
}
294062
function srcFiles() {
         return removeDuplicates(configFiles().concat(libFiles()).concat(modelFiles()).concat(srcDataFiles()).concat(codeFiles()));
     }
233629
function getConfigFiles () {
  const baseDir = getBaseDir()
  const configFiles = findConfigFiles(baseDir)
  const result = []

  configFiles.forEach(configFile => {
    const fileParsedObj = path.parse(configFile)
    const newFileName = `${fileParsedObj.name}${fileParsedObj.ext}`
    const newFilePath = configFile
    const oldFileName = `${fileParsedObj.name}.old${fileParsedObj.ext}`
    const oldFilePath = path.join(baseDir, oldFileName)

    if (!fs.existsSync(oldFilePath)) {
      return
    }

    const newFileContent = fs.readFileSync(newFilePath, { encoding: 'utf-8' })
    const oldFileContent = fs.readFileSync(oldFilePath, { encoding: 'utf-8' })

    result.push([
      {
        name: oldFileName,
        content: oldFileContent
      },
      {
        name: newFileName,
        content: newFileContent
      }
    ])
  })

  return result
}
772723
private Collection<FileStatus> toFileStatusesWithImplicitDirectories(
      Collection<FileInfo> fileInfos) throws IOException {
    List<FileStatus> fileStatuses = new ArrayList<>(fileInfos.size());
    Set<URI> filePaths = Sets.newHashSetWithExpectedSize(fileInfos.size());
    String userName = getUgiUserName();
    for (FileInfo fileInfo : fileInfos) {
      filePaths.add(fileInfo.getPath());
      fileStatuses.add(getFileStatus(fileInfo, userName));
    }

    // The flow for populating this doesn't bother to populate metadata entries for parent
    // directories but we know the parent directories are expected to exist, so we'll just
    // populate the missing entries explicitly here. Necessary for getFileStatus(parentOfInfo)
    // to work when using an instance of this class.
    for (FileInfo fileInfo : fileInfos) {
      URI parentPath = getGcsFs().getParentPath(fileInfo.getPath());
      while (parentPath != null && !parentPath.equals(GoogleCloudStorageFileSystem.GCS_ROOT)) {
        if (!filePaths.contains(parentPath)) {
          logger.atFine().log("Adding fake entry for missing parent path '%s'", parentPath);
          StorageResourceId id = pathCodec.validatePathAndGetId(parentPath, true);

          GoogleCloudStorageItemInfo fakeItemInfo =
              GoogleCloudStorageItemInfo.createInferredDirectory(id);
          FileInfo fakeFileInfo = FileInfo.fromItemInfo(pathCodec, fakeItemInfo);

          filePaths.add(parentPath);
          fileStatuses.add(getFileStatus(fakeFileInfo, userName));
        }
        parentPath = getGcsFs().getParentPath(parentPath);
      }
    }

    return fileStatuses;
  }
1116820
@Override
    protected List<ChecksumFile> getFilesToProcess()
    {
        final List<ChecksumFile> filesToProcess = new ArrayList<ChecksumFile>();
        for ( final FileSet fileSet : fileSets )
        {
            final DirectoryScanner scanner = new DirectoryScanner();
            final String fileSetDirectory = (new File( fileSet.getDirectory() ) ).getPath();

            scanner.setBasedir( fileSetDirectory );
            String[] includes;
            if ( fileSet.getIncludes() != null && !fileSet.getIncludes().isEmpty() )
            {
                final List<String> fileSetIncludes = fileSet.getIncludes();
                includes = fileSetIncludes.toArray( new String[fileSetIncludes.size()] );
            }
            else
            {
                includes = DEFAULT_INCLUDES;
            }
            scanner.setIncludes( includes );

            if ( fileSet.getExcludes() != null && !fileSet.getExcludes().isEmpty() )
            {
                final List<String> fileSetExcludes = fileSet.getExcludes();
                scanner.setExcludes( fileSetExcludes.toArray( new String[fileSetExcludes.size()] ) );
            }

            scanner.addDefaultExcludes();

            scanner.scan();

            for ( String filePath : scanner.getIncludedFiles() )
            {
                filesToProcess.add( new ChecksumFile( (new File( fileSetDirectory ) ).getPath(), new File( fileSetDirectory, filePath ), null, null ) );
            }
            }

        return filesToProcess;
    }
229219
public List<JCCompilationUnit> parseFiles(Iterable<JavaFileObject> fileObjects) {
       if (shouldStop(CompileState.PARSE))
           return List.nil();

        //parse all files
        ListBuffer<JCCompilationUnit> trees = new ListBuffer<>();
        Set<JavaFileObject> filesSoFar = new HashSet<>();
        for (JavaFileObject fileObject : fileObjects) {
            if (!filesSoFar.contains(fileObject)) {
                filesSoFar.add(fileObject);
                trees.append(parse(fileObject));
            }
        }
        return trees.toList();
    }
1142569
function jshintFileset(fileset) {
    var files = [];
    fileset.forEach(function (file) {
        if (isDirectory(file)) {
            files.push(file + '**/*.js');
        } else {
            files.push(file);
        }
    });

    return files;
}
233004
function resolvePluginFiles (collection, relPath) {
    return Immutable.fromJS(collection.reduce(function (all, item) {
        var full = path.join(relPath, item);
        if (fs.existsSync(full)) {
            all[full] = fs.readFileSync(full, "utf8");
        }
        return all;
    }, {}));
}
732824
function getStagedFiles(callback) {

    const options = [ 'diff', '--cached', '--name-only', '--diff-filter=ACM' ]

    execFile('git', options, (err, stdout) => {

        if (err) return callback(err)

        const stagedFiles = stdout
            .split('\n')
            .filter(filename => filename.match(/.js$/))

        callback(null, stagedFiles)

    })

}
93881
@Override
  public String[] getFileSuffixes() {
    String[] suffixes = filterEmptyStrings(settings.getStringArray(GroovyPlugin.FILE_SUFFIXES_KEY));
    if (suffixes.length == 0) {
      suffixes = StringUtils.split(GroovyPlugin.DEFAULT_FILE_SUFFIXES, ",");
    }
    return addDot(suffixes);
  }
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));
}
71252
function(source) {
      var result = [];

      while(source.length > 0) {
        if(result.length > 0) {
          var nextTarget = source.pop();

          for(var i=0; i<result.length; i++) {
            var targetFile = result[i];

            var dependencies = dependenciesMap[targetFile].dependencies;

            var dependencyMatch = matchPatternFromArray(dependencies, dependenciesMap[nextTarget].dependencyPath.pattern);

            if(dependencyMatch) {
              break;
            }
          }

          // move dependent file to front
          result.splice(i, 0, nextTarget);

        } else {
          result.push(source.pop());
        }
      }

      return result;
    }