MCPcopy Create free account
hub / github.com/apache/solr / listFiles

Method listFiles

solr/core/src/java/org/apache/solr/cli/PostTool.java:439–445  ·  view source on GitHub ↗
(Path directory, Predicate<Path> fileFilter)

Source from the content-addressed store, hash-verified

437 }
438
439 private static Collection<Path> listFiles(Path directory, Predicate<Path> fileFilter)
440 throws IOException {
441 Predicate<Path> filter = fileFilter != null ? fileFilter : p -> true;
442 try (Stream<Path> directoryFiles = Files.list(directory)) {
443 return directoryFiles.filter(filter).collect(Collectors.toList());
444 }
445 }
446
447 /**
448 * Check all the arguments looking to see if any are directories, and if so then we can recurse

Callers 2

postDirectoryMethod · 0.95
handleGlobMethod · 0.95

Calls 4

listMethod · 0.65
collectMethod · 0.65
toListMethod · 0.65
filterMethod · 0.45

Tested by

no test coverage detected