Class FileUtils
java.lang.Object
org.springframework.integration.file.support.FileUtils
public final class FileUtils extends Object
Utilities for operations on Files.
- Since:
- 5.0
- Author:
- Gary Russell
-
Field Summary
Fields Modifier and Type Field Description static boolean
IS_POSIX
-
Method Summary
Modifier and Type Method Description static <F> F[]
purgeUnwantedElements(F[] fileArray, Predicate<F> predicate, Comparator<F> comparator)
Remove entries from the array if the predicate returns true for an element.
-
Field Details
-
IS_POSIX
public static final boolean IS_POSIX
-
-
Method Details
-
purgeUnwantedElements
public static <F> F[] purgeUnwantedElements(F[] fileArray, Predicate<F> predicate, @Nullable Comparator<F> comparator)Remove entries from the array if the predicate returns true for an element.- Type Parameters:
F
- the file type.- Parameters:
fileArray
- the array.predicate
- the predicate.comparator
- an optional comparator to sort the results.- Returns:
- the array of remaining elements.
- Since:
- 5.0.7
-