|
ddiff Version 1.0.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ehsbe.ddiff.PathFilter
public class PathFilter extends Object implements java.nio.file.DirectoryStream.Filter<java.nio.file.Path>, FileFilter
A flexible exclude dir entry filter, which allows globbing as well as regular expressions. Globbing entries are always consulted first.
Constructor and Description |
---|
PathFilter(String[] exclude_globs,
Pattern[] exclude_regex,
boolean follow,
boolean hidden)
Create a new filter based on the given arguments. |
PathFilter(String[] globs,
String[] regex,
boolean follow,
boolean hidden)
Create a new filter based on the given arguments. |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File file)
|
boolean |
accept(java.nio.file.Path entry)
|
boolean |
followSymlinks()
Check, whether symlinks should be followed to the final destination. |
boolean |
useFiles()
Check, whether one should use File to obtain a directory listing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PathFilter(String[] globs, String[] regex, boolean follow, boolean hidden)
globs
- globbing patterns for pathnames to ignore. Might be null
,
but must NOT contain null
or invalid entries.regex
- regex patterns for pathnames to ignore. Might be null
,
but must NOT contain null
or invalid entries.follow
- if true
follow symlinkshidden
- if true
ignore hidden entries as wellpublic PathFilter(String[] exclude_globs, Pattern[] exclude_regex, boolean follow, boolean hidden)
exclude_globs
- globbing patterns for pathnames to ignore. Might be null
,
but must NOT contain null
or invalid entries.exclude_regex
- regex patterns for pathnames to ignore. Might be null
,
but must NOT contain null
entries.follow
- if true
follow symlinkshidden
- if true
ignore hidden entries as wellMethod Detail |
---|
public boolean useFiles()
File
to obtain a directory listing.
Default is false
, i.e. use the nio Path#newDirectoryStream(Filter)
directory scanner instead. It has no influence the filter itself, it is just a convinient
central place to store this property. It gets determined by the System property
dir.stream.bug
, which should be "true"
if the traditional File interface
should be used.
true
if traditional File
interface should be used.public boolean followSymlinks()
true
if symlinks should be resolved.public boolean accept(java.nio.file.Path entry)
accept
in interface java.nio.file.DirectoryStream.Filter<java.nio.file.Path>
public boolean accept(File file)
accept
in interface FileFilter
|
ddiff Version 1.0.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |