public interface FileVisitor
FileUtils.walkTree
.
By using an implementation of this interface in combination with
FileUtils.walkTree
, an action can be defined for
each file and directory encountered during a tree walk.Modifier and Type | Method and Description |
---|---|
FileVisitResult |
postVisitDirectory(Path dir,
XenonException exception,
Files files)
Invoked for a directory after entries in the directory, and all of their descendants, have been visited.
|
FileVisitResult |
preVisitDirectory(Path dir,
FileAttributes attributes,
Files files)
Invoked for a directory before entries in the directory are visited.
|
FileVisitResult |
visitFile(Path file,
FileAttributes attributes,
Files files)
Invoked for a file in a directory.
|
FileVisitResult |
visitFileFailed(Path file,
XenonException exception,
Files files)
Invoked for a file that could not be visited.
|
FileVisitResult postVisitDirectory(Path dir, XenonException exception, Files files) throws XenonException
dir
- the directory that was visited.exception
- any exception thrown while visiting the directory, or null
if there was no exception.files
- the Files
used to access the directory.XenonException
- if an I/O error occurs while visiting the directory.FileVisitResult preVisitDirectory(Path dir, FileAttributes attributes, Files files) throws XenonException
dir
- the directory to visit.attributes
- the attributes of the directory.files
- the Files
used to access the directory.XenonException
- if an I/O error occurs while visiting the directory.FileVisitResult visitFile(Path file, FileAttributes attributes, Files files) throws XenonException
file
- the file to visit.attributes
- the attributes of the file.files
- the Files
used to access the file.XenonException
- if an I/O error occurs while visiting the directory.FileVisitResult visitFileFailed(Path file, XenonException exception, Files files) throws XenonException
file
- the file that could not be visited.exception
- the exception thrown while visiting the file.files
- the Files
used to access the file.XenonException
- if an I/O error occurs while visiting the directory.