Gets all the directories/files in which the regexes for ignoring the files is placed. This includes the file/directory specified by the user
and the default paths that are WINDUP_HOME/ignore and ~/.windup/ignore.

@return
432063
public Iterable<Path> getAllIgnoreDirectories()
    {
        Set<Path> results = new HashSet<>();
        results.addAll(getDefaultUserIgnoreDirectories());
        File userSpecifiedFile = getOptionValue(UserIgnorePathOption.NAME);
        if (userSpecifiedFile != null)
        {
            results.add(userSpecifiedFile.toPath());
        }
        return results;
    }
462489
private List<String> existingRWPaths() {
        String[] lines = mountReader();
        List<String> pathsFound = new ArrayList<>();
        for (String line : lines) {
            // Split lines into parts
            String[] args = line.split(" ");
            if (args.length < 4){
                // If we don't have enough options per line, skip this and log an error
                Log.e(TAG, String.format("Error formatting mount: %s", line));
                continue;
            }
            String mountPoint = args[1];
            String mountOptions = args[3];

            for (String pathToCheck : PATHS_THAT_SHOULD_NOT_BE_WRITABLE) {
                if (mountPoint.equalsIgnoreCase(pathToCheck)) {
                    // Split options out and compare against "rw" to avoid false positives
                    for (String option : mountOptions.split(",")){
                        if (option.equalsIgnoreCase("rw")){
                            pathsFound.add(pathToCheck);
                            break;
                        }
                    }
                }
            }
        }
        return pathsFound;
    }
458174
public static FileFilter getFileFilter() {
        return new FileFilter() {

            @Override
            public boolean accept(File pathname) {
                //Accept if input  is a non-hidden file with registered extension
                //or if a non-hidden and not-ignored directory
                return !pathname.isHidden() && (pathname.isFile()
                    && Engines.getRecognizedExtensions().contains(fileExt(pathname))) || (directoryOnlyIfNotIgnored(pathname));
            }
        };
    }
817998
def get_directories_re(
            self,
            directory_re,
            full_path=False,
            ignorecase=False):
        """"""
        if ignorecase:
            compiled_re = re.compile(directory_re, re.I)
        else:
            compiled_re = re.compile(directory_re)

        found = set()

        if self.handle:
            for member in self.handle.getmembers():
                # zipfiles only list directories => have to work around that
                if isinstance(member, ZipInfo):
                    to_match = os.path.dirname(member.name)
                # tarfiles => only match directories
                elif isinstance(member, TarInfo) and member.isdir():
                    to_match = member.name
                else:
                    to_match = None
                if to_match:
                    if ((full_path and compiled_re.search(to_match)) or (
                            not full_path and compiled_re.search(
                                os.path.basename(to_match)))):
                        found.add(to_match)

        return list(found)
253488
private List<File> getUninstallDirs() {
		List<File> result = new ArrayList<File>();
		File x = new File(name);
		if (!x.isDirectory()) x = x.getParentFile();
		if (x.isDirectory()) result.add(x);
		result.add(eclipseIniPath.getParentFile());
		return result;
	}
682939
protected function _getPaths()
    {
        $directories = $this->_createDirectoryIterator($this->_getRootDir());
        $flattened   = $this->_createRecursiveIteratorIterator($directories);
        $flattened->setMaxDepth($this->_getMaxDepth());
        $filter = $this->_createFilterIterator($flattened, function (SplFileInfo $current, $key, Iterator $iterator) {
            return $this->_filterFile($current);
        });

        return $filter;
    }
475939
private static File[] getAllFiles(String dirName) {

    File dir = new File(dirName);

    File[] files = dir.listFiles(); // returns files and folders

    if (files != null) {
      List<File> filteredFiles = new ArrayList<File>();
      for (File file : files) {

        if (file.isFile()) {
          filteredFiles.add(file);
        }
      }
      return filteredFiles.toArray(new File[filteredFiles.size()]);
    } else {
      System.out.println(dirName + " does not denote a valid directory!");
      return new File[0];
    }
  }
38339
public java.util.List<WorkspaceDirectory> getDirectories() {
        if (directories == null) {
            directories = new com.amazonaws.internal.SdkInternalList<WorkspaceDirectory>();
        }
        return directories;
    }
593133
public function getFiles()
    {
        $iterator = new RecursiveDirectoryIterator(
            $this->directory,
            FilesystemIterator::SKIP_DOTS
        );
        $iterator = new RecursiveIteratorIterator($iterator);
        $iterator->rewind();

        return $iterator;
    }
1204391
protected FilenameFilter getFileFilter() {
		// accepts all files in default implementation
		return new FilenameFilter() {
			@Override
			public boolean accept(File dir, String name) {
				return true;
			}
		};

	}
521768
public function getSourceFiles()
    {
        $sourceFiles = array();
        $ignore = $this->configuration->get('ignore');

        if (is_dir($this->get('source'))) {
            $recursiveIterator = new \RecursiveIteratorIterator(
                new \RecursiveDirectoryIterator($this->get('source'))
            );

            foreach ($recursiveIterator as $file) {
                if (!$ignore || !preg_match($ignore, $file->getPathname())) {
                    $sourceFiles[$file->getFilename()] = $file->getPathname();
                }
            }
        }

        return $sourceFiles;
    }
1211805
public static Path getWindupRulesDir()
    {
        String rulesDir = System.getProperty(WINDUP_RULESETS_DIR_SYSPROP);
        if (rulesDir != null)
        {
            Path path = Paths.get(rulesDir);
            if (!path.toFile().exists())
                LOG.warning(WINDUP_RULESETS_DIR_SYSPROP + " points to a non-existent directory!" + path.toAbsolutePath().toString());
            return path;
        }
        else
            return getWindupSubdirectory(RULES_DIRECTORY_NAME);
    }
1009558
def get_ignored_tracks(self, localdir):
        
        ignore_file = "%s/.ignore" % localdir
        list = []
        if os.path.exists(ignore_file):
            f = open(ignore_file)
            ignored = f.readlines()
            f.close()

            for i in ignored:
                list.append("%s/%s" % (localdir, i.rstrip()))

        return list
721498
protected function ignoredFiles()
    {
        $lines = file($this->path());

        $ignored_files = [];
        foreach ($lines as $line) {
            $file = preg_replace("/\r|\n/", "", $line);
            if (!File::exists(base_path($file))) {
                continue;
            }
            $ignored_files[] = $file;
        }
        return $ignored_files;
    }
1357141
public Iterable<Path> getAllUserRulesDirectories()
    {
        Set<Path> results = new HashSet<>();
        results.addAll(getDefaultUserRulesDirectories());
        
        Collection<File> userSpecifiedFiles = getOptionValue(UserRulesDirectoryOption.NAME);
        if (userSpecifiedFiles != null && !userSpecifiedFiles.isEmpty())
        {
            userSpecifiedFiles.stream().forEach(file -> {
                results.add(file.toPath());
            });
        }
        return results;
    }
547780
def get_all_media(exclude=None):
    

    if not exclude:
        exclude = []

    media = set()

    for root, dirs, files in os.walk(six.text_type(settings.MEDIA_ROOT)):
        for name in files:
            path = os.path.abspath(os.path.join(root, name))
            relpath = os.path.relpath(path, settings.MEDIA_ROOT)
            for e in exclude:
                if re.match(r'^%s$' % re.escape(e).replace('\\*', '.*'), relpath):
                    break
            else:
                media.add(path)

    return media
243040
public function files()
    {
        $files = (new Finder)->files();

        foreach ($this->ignoredFiles as $name) {
            $files->notName($name);
        }

        foreach ($this->searchedFiles as $name) {
            $files->name($name);
        }

        return $files->exclude($this->ignoredDirectories)->in($this->dir);
    }