@Internal public class GlobFilePathFilter extends FilePathFilter
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
FilePathFilter.DefaultFilter
HADOOP_COPYING
Constructor and Description |
---|
GlobFilePathFilter()
Constructor for GlobFilePathFilter that will match all files
|
GlobFilePathFilter(List<String> includePatterns,
List<String> excludePatterns)
Constructor for GlobFilePathFilter
|
Modifier and Type | Method and Description |
---|---|
boolean |
filterPath(Path filePath)
Returns
true if the filePath given is to be
ignored when processing a directory, e.g. |
createDefaultFilter
public GlobFilePathFilter()
public boolean filterPath(Path filePath)
FilePathFilter
true
if the filePath
given is to be
ignored when processing a directory, e.g.
public boolean filterPaths(Path filePath) {
return filePath.getName().startsWith(".") || filePath.getName().contains("_COPYING_");
}
filterPath
in class FilePathFilter
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.