PathFilter@Public @Evolving public class GlobFilter extends java.lang.Object implements PathFilter
| Constructor | Description |
|---|---|
GlobFilter(java.lang.String filePattern) |
Creates a glob filter with the specified file pattern.
|
GlobFilter(java.lang.String filePattern,
PathFilter filter) |
Creates a glob filter with the specified file pattern and an user filter.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
accept(Path path) |
Tests whether or not the specified abstract pathname should be
included in a pathname list.
|
boolean |
hasPattern() |
public GlobFilter(java.lang.String filePattern)
throws java.io.IOException
filePattern - the file pattern.java.io.IOException - thrown if the file pattern is incorrect.public GlobFilter(java.lang.String filePattern,
PathFilter filter)
throws java.io.IOException
filePattern - the file pattern.filter - user filter in addition to the glob pattern.java.io.IOException - thrown if the file pattern is incorrect.public boolean hasPattern()
public boolean accept(Path path)
PathFilteraccept in interface PathFilterpath - The abstract pathname to be testedtrue if and only if pathname
should be includedCopyright © 2008–2025 Apache Software Foundation. All rights reserved.