public class DirectoryStreamFilter
extends java.lang.Object
implements java.nio.file.DirectoryStream.Filter<java.nio.file.Path>
DirectoryStream.Filter that delegates to a PathFilter.
You pass this filter to Files#newDirectoryStream(Path, DirectoryStream.Filter).
| Modifier and Type | Field and Description |
|---|---|
private PathFilter |
pathFilter |
| Constructor and Description |
|---|
DirectoryStreamFilter(PathFilter pathFilter)
Constructs a new instance for the given path filter.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(java.nio.file.Path path) |
PathFilter |
getPathFilter()
Gets the path filter.
|
private final PathFilter pathFilter
public DirectoryStreamFilter(PathFilter pathFilter)
pathFilter - How to filter paths.public boolean accept(java.nio.file.Path path)
throws java.io.IOException
accept in interface java.nio.file.DirectoryStream.Filter<java.nio.file.Path>java.io.IOExceptionpublic PathFilter getPathFilter()