Which three enum constants are defined in FilevisitResult?
A.
CONTINUE
B.
SKIP_SIBLINGS
C.
FOLLOW_LINKS
D.
TERMINATE
E.
NOFOLLOW_LINKS
F.
DELETE_CHILD
Explanation:
The FileVisitor methods return a FileVisitResult value. You can abort the file walking process or control whether a directory is visited by the values you return in the FileVisitor methods:
* CONTINUE Indicates that the file walking should continue. If the preVisitDirectory method returns CONTINUE, the directory is visited.
* SKIP_SIBLINGS When preVisitDirectory returns this value, the specified directory is not visited, postVisitDirectory is not invoked, and no further unvisited siblings are visited. If returned from the postVisitDirectory method, no further siblings are visited. Essentially, nothing further happens in the specified directory.
* TERMINATE Immediately aborts the file walking. No further file walking methods are invoked after this value is returned.
* SKIP_SUBTREE When preVisitDirectory returns this value, the specified directory and its subdirectories are skipped. This branch is “pruned out” of the tree.
Note:To walk a file tree, you first need to implement a FileVisitor. A FileVisitor specifies the required behavior at key points in the traversal process: when a file is visited, before a directory is accessed, after a directory is accessed, or when a failure occurs.
Reference: The Java Tutorials,Walking the File Tree