public class DirectoryStreamFilter extends Object implements DirectoryStream.Filter<Path>
DirectoryStream.Filter
that delegates to a PathFilter
.
You pass this filter to Files#newDirectoryStream(Path, DirectoryStream.Filter)
.
Constructor and Description |
---|
DirectoryStreamFilter(PathFilter pathFilter)
Constructs a new instance for the given path filter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Path path) |
PathFilter |
getPathFilter()
Gets the path filter.
|
public DirectoryStreamFilter(PathFilter pathFilter)
pathFilter
- How to filter paths.public boolean accept(Path path) throws IOException
accept
in interface DirectoryStream.Filter<Path>
IOException
public PathFilter getPathFilter()
Copyright © 2002–2021 The Apache Software Foundation. All rights reserved.