diff --git a/src/main/java/org/apache/commons/io/FileUtils.java b/src/main/java/org/apache/commons/io/FileUtils.java index 45427d1b0db..709779bc80f 100644 --- a/src/main/java/org/apache/commons/io/FileUtils.java +++ b/src/main/java/org/apache/commons/io/FileUtils.java @@ -2349,6 +2349,14 @@ public static Collection listFiles(final File directory, final IOFileFilte return toList(visitor.getFileList().stream().map(Path::toFile)); } + /** + * Lists files in the given {@code directory}, adding each file to the given list. + * + * @param directory A File for an assumed directory, not null. + * @param files The list to add found files, not null. + * @param recursive Whether or not to recurse into subdirectories. + * @param filter How to filter files, not null. + */ @SuppressWarnings("null") private static void listFiles(final File directory, final List files, final boolean recursive, final FilenameFilter filter) { final File[] listFiles = directory.listFiles();