|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.nio.file.SimpleFileVisitor<T>
T
- The type of reference to the filespublic class SimpleFileVisitor<T>
Disabled: no SafeJ information.
A simple visitor of files with default behavior to visit all files and to re-throw I/O errors.
Methods in this class may be overridden subject to their general contract.
Constructor Summary | |
---|---|
protected |
SimpleFileVisitor()
Initializes a new instance of this class. |
Method Summary | |
---|---|
FileVisitResult |
postVisitDirectory(T dir,
IOException exc)
Invoked for a directory after entries in the directory, and all of their descendants, have been visited. |
FileVisitResult |
preVisitDirectory(T dir)
Invoked for a directory before entries in the directory are visited. |
FileVisitResult |
preVisitDirectoryFailed(T dir,
IOException exc)
Invoked for a directory that could not be opened. |
FileVisitResult |
visitFile(T file,
BasicFileAttributes attrs)
Invoked for a file in a directory. |
FileVisitResult |
visitFileFailed(T file,
IOException exc)
Invoked for a file when its basic file attributes could not be read. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected SimpleFileVisitor()
Method Detail |
---|
public FileVisitResult preVisitDirectory(T dir)
Unless overridden, this method returns CONTINUE
.
preVisitDirectory
in interface FileVisitor<T>
dir
- a reference to the directory
public FileVisitResult preVisitDirectoryFailed(T dir, IOException exc)
Unless overridden, this method throws IOError
with the I/O
exception as cause.
preVisitDirectoryFailed
in interface FileVisitor<T>
dir
- a reference to the directoryexc
- the I/O exception thrown from the attempt to open the directory
IOError
- with the I/O exception thrown when the attempt to open the
directory failedpublic FileVisitResult visitFile(T file, BasicFileAttributes attrs)
Unless overridden, this method returns CONTINUE
.
visitFile
in interface FileVisitor<T>
file
- a reference to the fileattrs
- the file's basic attributes
public FileVisitResult visitFileFailed(T file, IOException exc)
Unless overridden, this method throws IOError
with the I/O
exception as cause.
visitFileFailed
in interface FileVisitor<T>
file
- a reference to the fileexc
- the I/O exception thrown from the attempt to read the file
attributes
IOError
- with the I/O exception thrown when the attempt to read the file
attributes failedpublic FileVisitResult postVisitDirectory(T dir, IOException exc)
Unless overridden, this method returns CONTINUE
if the directory iteration completes without an I/O exception;
otherwise this method throws IOError
with the I/O exception as
cause.
postVisitDirectory
in interface FileVisitor<T>
dir
- a reference to the directoryexc
- null
if the iteration of the directory completes without
an error; otherwise the I/O exception that caused the iteration
of the directory to complete prematurely
IOError
- with the I/O exception thrown when iteration of the directory
completed prematurely due to an I/O error
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |