phet commented on code in PR #3859:
URL: https://github.com/apache/gobblin/pull/3859#discussion_r1450853426
##########
gobblin-utility/src/main/java/org/apache/gobblin/util/FileListUtils.java:
##########
@@ -125,8 +125,17 @@ public static List<FileStatus>
listFilesRecursively(FileSystem fs, Path path, Pa
public static List<FileStatus> listFilesRecursively(FileSystem fs, Path
path, PathFilter fileFilter,
boolean applyFilterToDirectories)
throws IOException {
- return listFilesRecursivelyHelper(fs, Lists.newArrayList(),
fs.getFileStatus(path), fileFilter,
- applyFilterToDirectories, false);
+ return listFilesRecursively(fs, fs.getFileStatus(path), fileFilter,
applyFilterToDirectories);
+ }
+
+ /**
+ * Helper method to list out all files under a specified {@link FileStatus}.
If applyFilterToDirectories is false, the supplied
+ * {@link PathFilter} will only be applied to files.
+ */
+ public static List<FileStatus> listFilesRecursively(FileSystem fs,
FileStatus beneathThisFile, PathFilter fileFilter,
Review Comment:
just avoids accessing the `getFileStatus` twice (since we already had been
doing this internally for the recursion helper)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]