public class DirectoryTraverser
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DirectoryTraverser.CallbackHandler
Often there is nothing to do at the end, so for convenience we provided an abstract class with
empty function for handleEnd.
|
static interface |
DirectoryTraverser.CallbackHandlerInterface
Callback handler.
|
static class |
DirectoryTraverser.FilePrinter
Implementation which just prints file paths.
|
Modifier and Type | Field and Description |
---|---|
static DirectoryTraverser.FilePrinter |
STDOUT_PRINTER
Implementation which prints file paths to standard output.
|
Constructor and Description |
---|
DirectoryTraverser() |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args)
Main function which prints file paths to standard output.
|
static void |
traverse(java.io.File root,
DirectoryTraverser.CallbackHandlerInterface handler) |
public static final DirectoryTraverser.FilePrinter STDOUT_PRINTER
public static void traverse(java.io.File root, DirectoryTraverser.CallbackHandlerInterface handler)
public static void main(java.lang.String[] args)
args
- Only one argument, the name/path of the root for the traversal.