Package org.apache.flink.api.common.io
Class GlobFilePathFilter
- java.lang.Object
-
- org.apache.flink.api.common.io.FilePathFilter
-
- org.apache.flink.api.common.io.GlobFilePathFilter
-
- All Implemented Interfaces:
Serializable
@Internal public class GlobFilePathFilter extends FilePathFilter
Class for determining if a particular file should be included or excluded based on a set of include and exclude glob filters.Glob filter support the following expressions:
- * - matches any number of any characters including none
- ** - matches any file in all subdirectories
- ? - matches any single character
- [abc] - matches one of the characters listed in a brackets
- [a-z] - matches one character from the range given in the brackets
If does not match an include pattern it is excluded. If it matches and include pattern but also matches an exclude pattern it is excluded.
If no patterns are provided all files are included
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.flink.api.common.io.FilePathFilter
FilePathFilter.DefaultFilter
-
-
Field Summary
-
Fields inherited from class org.apache.flink.api.common.io.FilePathFilter
HADOOP_COPYING
-
-
Constructor Summary
Constructors Constructor Description GlobFilePathFilter()Constructor for GlobFilePathFilter that will match all filesGlobFilePathFilter(List<String> includePatterns, List<String> excludePatterns)Constructor for GlobFilePathFilter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanfilterPath(Path filePath)Returnstrueif thefilePathgiven is to be ignored when processing a directory, e.g.-
Methods inherited from class org.apache.flink.api.common.io.FilePathFilter
createDefaultFilter
-
-
-
-
Method Detail
-
filterPath
public boolean filterPath(Path filePath)
Description copied from class:FilePathFilterReturnstrueif thefilePathgiven is to be ignored when processing a directory, e.g.public boolean filterPaths(Path filePath) { return filePath.getName().startsWith(".") || filePath.getName().contains("_COPYING_"); }- Specified by:
filterPathin classFilePathFilter
-
-