Combines the configured suppressionFile and suppressionFiles into a
single array.

@return an array of suppression file paths
333657
private String[] determineSuppressions() {
        String[] suppressions = suppressionFiles;
        if (suppressionFile != null) {
            if (suppressions == null) {
                suppressions = new String[]{suppressionFile};
            } else {
                suppressions = Arrays.copyOf(suppressions, suppressions.length + 1);
                suppressions[suppressions.length - 1] = suppressionFile;
            }
        }
        return suppressions;
    }
923378
private function getIncludedFiles()
    {
        // Retrieve the include and exclude lists
        // from the options
        $include = Options::get('coverage.include');
        $exclude = Options::get('coverage.exclude');

        // Create empty arrays to store our filenames in
        $includedFiles = [];
        $excludedFiles = [];

        // If we have marked files as included
        if ($include !== null) {
            // Convert a string to an array so that
            // we only have to loop once
            if (!is_array($include)) {
                $include = [$include];
            }

            // Loop through each of the include glob strings
            foreach ($include as $glob) {
                // Prepend the current working directory to the glob
                $glob = $this->runner->pwd.'/'.$glob;

                // Add the glob results to the included files array
                $includedFiles = array_merge($includedFiles, glob_recursive($glob));
            }
        }

        // If we have marked files as excluded
        if ($exclude !== null) {
            // Convert a string to an array so that
            // we only have to loop once
            if (!is_array($exclude)) {
                $exclude = [$exclude];
            }

            // Loop through each of the include glob strings
            foreach ($exclude as $glob) {
                // Prepend the current working directory to the glob
                $glob = $this->runner->pwd.'/'.$glob;

                // Add the glob results to the excluded files array
                $excludedFiles = array_merge($excludedFiles, glob_recursive($glob));
            }
        }

        // Store the results
        $this->includedFiles = $includedFiles ?: [];
        $this->excludedFiles = $excludedFiles ?: [];
    }
1109346
public static List<File> pathsFiles(final String paths, final Predicate<File> predicate) {
        final List<File> files = new ArrayList<File>();
        for (final String filePathAndName : paths.split(File.pathSeparator)) {
            final File file = new File(filePathAndName);
            if (file.isDirectory()) {
                try (final Stream<Path> stream = Files.walk(file.toPath(), Integer.MAX_VALUE)) {
                    stream.map(f -> f.toFile()).filter(predicate).forEach(files::add);
                } catch (final IOException ex) {
                    throw new RuntimeException("Error walking path: " + file, ex);
                }
            } else {
                if (predicate.test(file)) {
                    files.add(file);
                }
            }
        }
        return files;
    }
824960
public function getFiles()
    {
        $files = $this->getGeneralFiles();

        if ($this->option('domain') && ! $this->option('lucid')) {
            return array_replace_recursive($files, $this->getDomainStubPaths());
        }

        if ($this->option('lucid')) {
            return array_merge($files, $this->getLucidPaths());
        }

        return $files;
    }
473644
public function getFilePaths()
    {
        $files = [];
        foreach ($this->config->getIncludedPaths() as $path) {
            $files[] = $this->getAllFilesFromGit($this->getGitRepositoryFor($path));
        }

        return array_merge(...$files);
    }
295150
public List<File> getInactiveOverlays() throws PatchingException {
        if (referencedOverlayDirectories == null) {
            walk();
        }
        List<File> inactiveDirs = null;
        for (Layer layer : installedIdentity.getLayers()) {
            final File overlaysDir = new File(layer.getDirectoryStructure().getModuleRoot(), Constants.OVERLAYS);
            final File[] inactiveLayerDirs = overlaysDir.listFiles(new FileFilter() {
                @Override
                public boolean accept(File pathname) {
                    return pathname.isDirectory() && !referencedOverlayDirectories.contains(pathname);
                }
            });
            if (inactiveLayerDirs != null && inactiveLayerDirs.length > 0) {
                if (inactiveDirs == null) {
                    inactiveDirs = new ArrayList<File>();
                }
                inactiveDirs.addAll(Arrays.asList(inactiveLayerDirs));
            }
        }
        return inactiveDirs == null ? Collections.<File>emptyList() : inactiveDirs;
    }
185575
private Set<String> findExclusionPaths() throws InitException {
       Set<String> exclusions = new TreeSet<String>();
       
       // Let other handlers deal with folders that do not reside in the WEB-INF or META-INF
       List<String> collect = null;
       File webapp = new File(deploymentInfo.getRealPath(""));
       String[] paths = webapp.list();
       if (webapp.exists() && paths != null)
           collect = Arrays.asList(paths);
       
       if (webapp.exists() && !webapp.canRead()) {
           // It means that the server cannot read files at all
           throw new InitException( HttpHandlerImpl.class.getName() + " cannot read files. Reason is unknown");
       } else if (!webapp.exists() || collect == null || collect.isEmpty()) {
           // Whenever this is empty it might just be because someone forgot to add the 'webapp' folder to the distribution
           // OR the framework is used without the need for serving files (such as views).
           logger.error("HttpHandlerImpl did not find any files in webapp - not serving any files then");
           return exclusions;
       }
       
       Set<String> resourcePaths = new TreeSet<>(collect);//servletContext.getResourcePaths("/");
       resourcePaths.removeIf( path -> path.contains("-INF") || path.contains("-inf"));
   
       // We still need to also remove the views folder from being processed by other handlers
       resourcePaths.removeIf( path -> path.contains(TemplateEngine.TEMPLATES_FOLDER));
       
       // Add the remaining paths to exclusions
       for (String path : resourcePaths) {
           // add leading slash
           if (path.charAt(0) != '/')
               path = '/' + path;
           
           // remove the last slash
           if (path.charAt(path.length()-1) == '/')
               path = path.substring(0, path.length()-1);
           exclusions.add(path);
       }
       
       return exclusions;
   }
1197718
public List<File> getFiles() {
        List<File> result = new LinkedList<File>();
        for (DataFile dataFile : dataFiles.values()) {
            result.add(dataFile.getFile());
        }
        return result;
    }
1342136
private Set<String> findExclusionPaths(ServletContext servletContext) {
        Set<String> exclusions = new TreeSet<String>();
        
        // Let other handlers deal with folders that do not reside in the WEB-INF or META-INF
        Set<String> resourcePaths = servletContext.getResourcePaths("/");
        
        // This most certainly should not be null!
        // It means that the server cannot read files at all
        if (resourcePaths == null) throw new InitException("ServletContext cannot read files. Reason is unknown");
        
        resourcePaths.removeIf( path -> path.contains("-INF") || path.contains("-inf"));
    
        // We still need to also remove the views folder from being processed by other handlers
        resourcePaths.removeIf( path -> path.contains(TemplateEngine.TEMPLATES_FOLDER));
        
        // Add the remaining paths to exclusions
        for (String path : resourcePaths) {
            // add leading slash
            if (path.charAt(0) != '/')
                path = '/' + path;
            
            // remove the last slash
            if (path.charAt(path.length()-1) == '/')
                path = path.substring(0, path.length()-1);
            exclusions.add(path);
        }
        
        return exclusions;
    }
241839
public function getAllowedFileTypes()
	{
		$arrFileTypesOfParents = array();
		
		if ($this->fileTypesInherit && !$this->isRootCategory() && $this->hasParentCategory())
		{
			$arrFileTypesOfParents = $this->parentCategory->getAllowedFileTypes();
		}
		
		$arrFileTypes = DmsUtils::getUniqueFileTypes($this->fileTypes, $arrFileTypesOfParents);
		
		return $arrFileTypes;
	}
14048
public List<Path> getDefaultUserIgnoreDirectories()
    {
        List<Path> paths = getOptionValue(DEFAULT_USER_IGNORE_DIRECTORIES_OPTION);
        if (paths == null)
        {
            return Collections.emptyList();
        }
        return Collections.unmodifiableList(paths);
    }
835250
protected File[] listSegmentFiles() {
        File segDir = new File(_segHomePath);
        File[] segFiles = segDir.listFiles(new FileFilter() {
            @Override
            public boolean accept(File filePath) {
                String fileName = filePath.getName();
                if (fileName.matches("^[0-9]+\\.seg$")) {
                    return true;
                }
                return false;
            }
        });

        if (segFiles == null) {
            segFiles = new File[0];
        } else if (segFiles.length > 0) {
            Arrays.sort(segFiles, new Comparator<File>() {
                @Override
                public int compare(File f1, File f2) {
                    int segId1 = Integer.parseInt(f1.getName().substring(0, f1.getName().indexOf('.')));
                    int segId2 = Integer.parseInt(f2.getName().substring(0, f2.getName().indexOf('.')));
                    return (segId1 < segId2) ? -1 : ((segId1 == segId2) ? 0 : 1);
                }
            });
        }

        return segFiles;
    }
71706
public function getAvailableSetFiles()
    {
        $arrSets = array();
        foreach ($GLOBALS['TL_CONFIG']['advancedClassesSets'] as $key => $value)
        {
            if(!strpos($value,"system/")!==false)
            {
                $arrSets[$value] = basename( $value ) . ' (custom)';
                continue;
            }
            $arrSets[$value] = basename( $value );

        }
        return $arrSets;
    }
104242
public String[] getSpillingDirectoriesPaths() {
		String[] strings = new String[this.paths.length];
		for (int i = 0; i < strings.length; i++) {
			strings[i] = paths[i].getAbsolutePath();
		}
		return strings;
	}
50017
public function getIncludePaths()
	{
		$includes = array();

		foreach ( $this->_manifests as $path => $manifest )
		{
			if ( isset( $manifest['include'] ) )
			{
				foreach ( $manifest['include'] as $paths ) {
					$includes[] = $path . DIRECTORY_SEPARATOR . $paths;
				}
			}
		}

		return $includes;
	}
570597
public static String[] getMatchingPaths(final String[] includes,
			final String[] excludes, final String baseDir) {
		DirectoryScanner scanner = new DirectoryScanner();
		scanner.setBasedir(baseDir);
		if (includes != null && includes.length > 0){
			scanner.setIncludes(includes);
		}
		if (excludes != null && excludes.length > 0){
			scanner.setExcludes(excludes);
		}
		scanner.scan();
		return scanner.getIncludedFiles();
	}
325875
private function getConfigurationFiles()
    {
        $path = $this->configPath;

        if (!is_dir($path)) {
            return [];
        }

        $files = [];
        $phpFiles = Finder::create()->files()->name('*.php')->in($path)->depth(0);

        foreach ($phpFiles as $file) {
            $files[basename($file->getRealPath(), '.php')] = $file->getRealPath();
        }

        return $files;
    }