@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.DefaultFilterHADOOP_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. |
createDefaultFilterpublic GlobFilePathFilter()
public boolean filterPath(Path filePath)
FilePathFiltertrue 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 FilePathFilterCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.