A
- The type of the attachment.public interface FileSystemNodeVisitor<A>
A visitor of file system nodes.
Modifier and Type | Method and Description |
---|---|
FileSystemNodeVisitResult |
postVisitDirectory(FileSystemNode<A> node)
Invoked for a directory node after children in the directory node, and
all of their descendants, have been visited.
|
FileSystemNodeVisitResult |
preVisitDirectory(FileSystemNode<A> node)
Invoked for a directory node before children of the directory node are
visited.
|
FileSystemNodeVisitResult |
visitFile(FileSystemNode<A> node)
Invoked for a file node in a directory node.
|
FileSystemNodeVisitResult preVisitDirectory(FileSystemNode<A> node) throws IOException
Invoked for a directory node before children of the directory node are visited.
If this method returns FileSystemNodeVisitResult.CONTINUE
, then
children of the directory node are visited. If this method returns
FileSystemNodeVisitResult.SKIP_SUBTREE
or
FileSystemNodeVisitResult.SKIP_SIBLINGS
then children of the
directory node (and any descendants) will not be visited.
node
- The directory node.IllegalArgumentException
- If the directory node is null
.IOException
- If an I/O error occurs.FileSystemNodeVisitResult visitFile(FileSystemNode<A> node) throws IOException
Invoked for a file node in a directory node.
node
- The file node.IllegalArgumentException
- If the file node is null
.IOException
- If an I/O error occurs.FileSystemNodeVisitResult postVisitDirectory(FileSystemNode<A> node) throws IOException
Invoked for a directory node after children in the directory node, and
all of their descendants, have been visited. This method is also invoked
when iteration of the directory completes prematurely (by a
visitFile(FileSystemNode)
method returning
FileSystemNodeVisitResult.SKIP_SIBLINGS
directory).
node
- The directory node.IllegalArgumentException
- If the directory node is null
.IOException
- If an I/O error occurs.Copyright © 2015–2019. All rights reserved.