|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ScanConductor
Visitor pattern for the DirectoryScanner. A ScanConductor controls the scanning process.
Create an instance and pass it to
DirectoryScanner.setScanConductor(ScanConductor)
.
You will get notified about every visited directory and file. You can use the ScanConductor.ScanAction
to control what should happen next.
A ScanConductor might also store own information but users must make sure that the state gets cleaned between two scan() invocations.
Nested Class Summary | |
---|---|
static class |
ScanConductor.ScanAction
|
Method Summary | |
---|---|
ScanConductor.ScanAction |
visitDirectory(String name,
File directory)
This method will get invoked for every detected directory. |
ScanConductor.ScanAction |
visitFile(String name,
File file)
This method will get invoked for every detected file. |
Method Detail |
---|
ScanConductor.ScanAction visitDirectory(String name, File directory)
name
- the directory name (contains parent folders up to the pwd)directory
-
ScanConductor.ScanAction visitFile(String name, File file)
name
- the file name (contains parent folders up to the pwd)file
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |