E - must be a Path or a class that inherits from
it.
java.nio.file.FileVisitor<E>private static final class FileToBytesExporter.Glob.Visitor<E extends java.nio.file.Path>
extends java.nio.file.SimpleFileVisitor<E>
SimpleFileVisitor.
Path| Modifier and Type | Field | Description |
|---|---|---|
private java.util.ArrayList<java.io.File>
|
mMatches
|
|
private java.nio.file.PathMatcher
|
mPathMatcher
|
| Modifier | Constructor | Description |
|---|---|---|
private |
Visitor()
|
Do not let anyone use this constructor
|
|
Visitor(java.nio.file.PathMatcher pathMatcher,
java.util.ArrayList<java.io.File> matches)
|
Generates an instance for the visitor.
|
| Modifier and Type | Method | Description |
|---|---|---|
java.nio.file.FileVisitResult |
visitFile(java.nio.file.Path file,
java.nio.file.attribute.BasicFileAttributes attrs)
|
Invoked for a file in a directory.
|
java.nio.file.FileVisitResult |
visitFileFailed(java.nio.file.Path file,
java.io.IOException exc) |
Invoked for a file that could not be
visited.
|
private java.nio.file.PathMatcher mPathMatcher
private java.util.ArrayList<java.io.File> mMatches
private Visitor()
public Visitor(java.nio.file.PathMatcher pathMatcher,
java.util.ArrayList<java.io.File> matches)
pathMatcher - defined matcher for finding files
- cannot be null.
matches - ArrayList of
Files which will contain all the
results - cannot be null.
java.lang.NullPointerException - if pathMatcher
or matches are null.
public java.nio.file.FileVisitResult visitFile(java.nio.file.Path file,
java.nio.file.attribute.BasicFileAttributes attrs)
Unless overridden, this method returns CONTINUE.
visitFile in interface java.nio.file.FileVisitor<E
extends java.nio.file.Path>visitFile in class java.nio.file.SimpleFileVisitor<E
extends java.nio.file.Path>file - current file that is being visitedattrs - file attributes which determines if it
is a dir, or a file, creation
date, etc.
public java.nio.file.FileVisitResult visitFileFailed(java.nio.file.Path file,
java.io.IOException exc)
Unless overridden, this method re-throws the I/O exception that prevented the file from being visited.
visitFileFailed in interface java.nio.file.FileVisitor<E
extends java.nio.file.Path>visitFileFailed in class java.nio.file.SimpleFileVisitor<E
extends java.nio.file.Path>file - file that could not be visitedexc - exception thrown with the cause of not
being able to visit that file
FileError
- with the file information and thrown exception