Returns the paths of the files not yet processed.
@param fileSystem The filesystem where the monitored directory resides.
164905
private Map<Path, FileStatus> listEligibleFiles(FileSystem fileSystem, Path path) throws IOException {

		final FileStatus[] statuses;
		try {
			statuses = fileSystem.listStatus(path);
		} catch (IOException e) {
			// we may run into an IOException if files are moved while listing their status
			// delay the check for eligible files in this case
			return Collections.emptyMap();
		}

		if (statuses == null) {
			LOG.warn("Path does not exist: {}", path);
			return Collections.emptyMap();
		} else {
			Map<Path, FileStatus> files = new HashMap<>();
			// handle the new files
			for (FileStatus status : statuses) {
				if (!status.isDir()) {
					Path filePath = status.getPath();
					long modificationTime = status.getModificationTime();
					if (!shouldIgnore(filePath, modificationTime)) {
						files.put(filePath, status);
					}
				} else if (format.getNestedFileEnumeration() && format.acceptFile(status)){
					files.putAll(listEligibleFiles(fileSystem, status.getPath()));
				}
			}
			return files;
		}
	}
542877
def filepaths(self):
        
        return nativestring(self._filepathEdit.text()).split(os.path.pathsep)
1240299
public function getFilesystemPaths()
    {
        return array_map(
            function (FilesystemResource $resource) {
                return $resource->getFilesystemPath();
            },
            array_filter(
                $this->toArray(),
                function (PuliResource $r) {
                    return $r instanceof FilesystemResource && null !== $r->getFilesystemPath();
                }
            )
        );
    }
834166
private FileStatus[] getFileStatus(Path[] paths) throws IOException {
    if (paths == null) {
      return null;
    }
    ArrayList<FileStatus> results = new ArrayList<FileStatus>(paths.length);
    for (int i = 0; i < paths.length; i++) {
      try {
        results.add(getFileStatus(paths[i]));
      } catch (FileNotFoundException e) { // do nothing
      }
    }
    return results.toArray(new FileStatus[results.size()]);
  }
228007
private Path[] listPaths(final Path path)
      throws IOException {
    Path[] children = null;
    ArrayList<Path> tmpChildrenPath = new ArrayList<>();
    if (fs.isDirectory(path)) {
      // Get children's path list.
      FileStatus[] chiledrenFileStatus = pathFilter == null ? fs.listStatus(path) : fs.listStatus(path, pathFilter);
      for (FileStatus childFileStatus : chiledrenFileStatus) {
        tmpChildrenPath.add(childFileStatus.getPath());
      }
      children = tmpChildrenPath.toArray(new Path[tmpChildrenPath.size()]);
    }
    if (children == null) {
      children = EMPTY_PATH_ARRAY;
    }
    if (comparator != null && children.length > 1) {
      Arrays.sort(children, comparator);
    }
    return children;
  }
408820
def paths(self) -> [str]:
        

        return set([f.path for f in list(self._files.values())])
471558
public static File[] getFiles(List<String> paths) {
        File[] files = new File[paths.size()];
        int i = 0;
        for (String file : paths) {
            files[i++] = new File(file);
        }
        return files;
    }
1045317
private static void traverseDirs(List<FileStatus> fileStatusesList, FileSystem hdfs,
      Path inputPath, JobFileModifiedRangePathFilter jobFileModifiedRangePathFilter)
          throws IOException
  {
    // get all the files and dirs in the current dir
    FileStatus allFiles[] = hdfs.listStatus(inputPath);
    for (FileStatus aFile: allFiles) {
      if (aFile.isDir()) {
        //recurse here
        traverseDirs(fileStatusesList, hdfs, aFile.getPath(), jobFileModifiedRangePathFilter);
      }
      else {
        // check if the pathFilter is accepted for this file
        if (jobFileModifiedRangePathFilter.accept(aFile.getPath())) {
          fileStatusesList.add(aFile);
        }
      }
    }
  }
912562
public static FileSystem getOptionallyThrottledFileSystem(FileSystem fs, State state) throws IOException {
    DeprecationUtils.renameDeprecatedKeys(state, MAX_FILESYSTEM_QPS, DEPRECATED_KEYS);

    if (state.contains(MAX_FILESYSTEM_QPS)) {
      return getOptionallyThrottledFileSystem(fs, state.getPropAsInt(MAX_FILESYSTEM_QPS));
    }
    return fs;
  }
1202571
public static FileStatus getAnyNonHiddenFile(FileSystem fs, Path path)
      throws IOException {
    HiddenFilter hiddenFilter = new HiddenFilter();

    FileStatus root = fs.getFileStatus(path);
    if (!root.isDirectory()) {
      return hiddenFilter.accept(path) ? root : null;
    }

    // DFS to get the first data file
    Stack<FileStatus> folders = new Stack<>();
    folders.push(root);
    while (!folders.empty()) {
      FileStatus curFolder = folders.pop();
      try {
        for (FileStatus status : fs.listStatus(curFolder.getPath(), hiddenFilter)) {
          if (status.isDirectory()) {
            folders.push(status);
          } else {
            return status;
          }
        }
      } catch (FileNotFoundException exc) {
        // continue
      }
    }

    return null;
  }
122729
def get_file_systems(self):
        
        result = {}
        if os.access('/proc/mounts', os.R_OK):
            file = open('/proc/mounts')
            for line in file:
                try:
                    mount = line.split()
                    device = mount[0]
                    mount_point = mount[1]
                    fs_type = mount[2]
                except (IndexError, ValueError):
                    continue

                # Skip the filesystem if it is not in the list of valid
                # filesystems
                if fs_type not in self.filesystems:
                    self.log.debug("Ignoring %s since it is of type %s " +
                                   " which is not in the list of filesystems.",
                                   mount_point, fs_type)
                    continue

                # Process the filters
                if self.exclude_reg.search(mount_point):
                    self.log.debug("Ignoring %s since it is in the " +
                                   "exclude_filter list.", mount_point)
                    continue

                if ((('/' in device or device == 'tmpfs') and
                     mount_point.startswith('/'))):
                    try:
                        stat = os.stat(mount_point)
                    except OSError:
                        self.log.debug("Path %s is not mounted - skipping.",
                                       mount_point)
                        continue

                    if stat.st_dev in result:
                        continue

                    result[stat.st_dev] = {
                        'device': os.path.realpath(device),
                        'mount_point': mount_point,
                        'fs_type': fs_type
                    }

            file.close()

        else:
            if not psutil:
                self.log.error('Unable to import psutil')
                return None

            partitions = psutil.disk_partitions(False)
            for partition in partitions:
                result[len(result)] = {
                    'device': os.path.realpath(partition.device),
                    'mount_point': partition.mountpoint,
                    'fs_type': partition.fstype
                }
            pass

        return result
300342
public static List<FileStatus> listMostNestedPathRecursively(FileSystem fs, Path path, PathFilter fileFilter)
      throws IOException {
    return listMostNestedPathRecursivelyHelper(fs, Lists.<FileStatus>newArrayList(), fs.getFileStatus(path),
        fileFilter);
  }
145752
function paths(dir) {
	var paths = [];

	try {
		fs.statSync(dir);
	}
	catch (e) {
		return e;
	}

	(function traverse(dir, stack) {
		stack.push(dir);
		fs.readdirSync(stack.join('/')).forEach(function(file) {
			var path = stack.concat([file]).join('/'),
				stat = fs.statSync(path);

			if (file[0] == '.' || file === 'vendor') {
				return;
			} else if (stat.isFile() && /\.js$/.test(file)) {
				paths.push(path);
			} else if (stat.isDirectory()) {
				paths.push(path);
				traverse(file, stack);
			}
		});
		stack.pop();
	})(dir || '.', []);

	return paths;
}
309742
def find_file_paths(self):
        
        paths = []
        for root, dirs, files in os.walk(self.directory, topdown=True):
            rel_path = os.path.relpath(root, self.directory)
            for f in files:
                if rel_path == '.':
                    path = (f, os.path.join(root, f))
                else:
                    path = (os.path.join(rel_path, f), os.path.join(root, f))
                paths.append(path)
        return paths
847535
public List<Path> getSrcPathExpanded() throws IOException {
    FileSystem fs = srcPath.getFileSystem(conf);

    // globbing on srcPath
    FileStatus[] gpaths = fs.globStatus(srcPath);
    if (gpaths == null) {
      return Collections.emptyList();
    }
    List<Path> results = new ArrayList<Path>(gpaths.length);
    for (FileStatus f : gpaths) {
      results.add(f.getPath().makeQualified(fs));
    }
    return removeConflictPath(results);
  }
176252
def _GetDirectory(self):
    
    if self._fsapfs_file_entry.number_of_sub_file_entries <= 0:
      return None

    return APFSDirectory(self._file_system, self.path_spec)
463312
static Collection<Path> findFiles(Path dir) {
		return toPaths(dir.toFile().listFiles((FileFilter) FileFileFilter.FILE));
	}