|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.util.FileVisitor
public abstract class FileVisitor
Visits files in a directory recursively.
DirScanner| Constructor Summary | |
|---|---|
FileVisitor()
|
|
| Method Summary | |
|---|---|
boolean |
understandsSymlink()
Some visitors can handle symlinks as symlinks. |
abstract void |
visit(File f,
String relativePath)
Called for each file and directory that matches the criteria implied by DirScanner |
void |
visitSymlink(File link,
String target,
String relativePath)
Some visitors can handle symlinks as symlinks. |
FileVisitor |
with(FileFilter f)
Decorates a visitor by a given filter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileVisitor()
| Method Detail |
|---|
public abstract void visit(File f,
String relativePath)
throws IOException
DirScanner
f - Either a file or a directory.relativePath - The file/directory name in question
IOException
public void visitSymlink(File link,
String target,
String relativePath)
throws IOException
This method is invoked by those DirScanners that can handle symlinks as symlinks.
(Not every DirScanners are capable of doing that, as proper symlink handling requires
letting visitors decide whether or not to descend into a symlink directory.)
IOExceptionpublic boolean understandsSymlink()
visitSymlink(File, String, String).
Note that failures to detect or read symlinks on certain platforms
can cause visit(java.io.File, java.lang.String) to be called on a file which is actually a symlink.
public final FileVisitor with(FileFilter f)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||