org.springframework.integration.file.filters
Class SimplePatternFileListFilter
java.lang.Object
org.springframework.integration.file.entries.AbstractEntryListFilter<java.io.File>
org.springframework.integration.file.filters.SimplePatternFileListFilter
- All Implemented Interfaces:
- InitializingBean, EntryListFilter<java.io.File>, FileListFilter
public class SimplePatternFileListFilter
- extends AbstractEntryListFilter<java.io.File>
- implements FileListFilter
Filter that supports ant style path expressions, which are less powerful but more readable than regular expressions.
This filter only filters on the name of the file, the rest of the path is ignored.
- Since:
- 2.0.0
- See Also:
AntPathMatcher
,
PatternMatchingFileListFilter
Method Summary |
boolean |
accept(java.io.File file)
Accept the given file its name matches the pattern, |
java.util.List<java.io.File> |
filterFiles(java.io.File[] files)
Filters out files and returns the files that are left in a list, or an
empty list when a null is passed in. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimplePatternFileListFilter
public SimplePatternFileListFilter(java.lang.String path)
accept
public boolean accept(java.io.File file)
- Accept the given file its name matches the pattern,
- Specified by:
accept
in class AbstractEntryListFilter<java.io.File>
filterFiles
public java.util.List<java.io.File> filterFiles(java.io.File[] files)
- Description copied from interface:
FileListFilter
- Filters out files and returns the files that are left in a list, or an
empty list when a null is passed in.
- Specified by:
filterFiles
in interface FileListFilter