public static class DirScanner.Glob extends DirScanner
An initial basename is prepended as with DirScanner.Full
if the includes and excludes are blank.
Otherwise there is no prepended path. So for example when scanning a directory /tmp/dir
containing a file file
,
the relativePath
sent to the FileVisitor
will be dir/file
if includes
is blank
but file
if it is **
. (This anomaly is historical.)
DirScanner.Filter, DirScanner.Full, DirScanner.Glob
Constructor and Description |
---|
Glob(String includes,
String excludes) |
Glob(String includes,
String excludes,
boolean useDefaultExcludes) |
Glob(String includes,
String excludes,
boolean useDefaultExcludes,
boolean followSymlinks) |
Modifier and Type | Method and Description |
---|---|
void |
scan(File dir,
FileVisitor visitor)
Scans the given directory and pass files onto the given visitor.
|
scanSingle
public void scan(File dir, FileVisitor visitor) throws IOException
DirScanner
scan
in class DirScanner
IOException
Copyright © 2004–2021. All rights reserved.