public class Wanderer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
exhaustiveSearch |
protected boolean |
topToBottom |
Constructor and Description |
---|
Wanderer() |
Wanderer(WandererCallback callback) |
Modifier and Type | Method and Description |
---|---|
WandererCallback |
getCallback() |
protected boolean |
handleDirectory(java.io.File directory,
java.lang.String[] contentNames)
Management method for the wanderer, that steps through the children of the
directory and calls handleEntry for them.
|
boolean |
handleEntry(java.io.File file)
Given a file representing a top-level directory, start wandering the tree
and call handleDirectory or handleFile on the WandererCallback.
|
boolean |
isExhaustiveSearch() |
boolean |
isTopToBottom() |
static void |
main(java.lang.String[] argv)
Given a set of files or directories, parade through them to change their
case.
|
void |
setCallback(WandererCallback cb) |
void |
setExhaustiveSearch(boolean exhaustiveSearch) |
void |
setTopToBottom(boolean topToBottom)
Set to true if handleDirectory is called before moving to
handleFile/handleDirectory for child files.
|
protected boolean exhaustiveSearch
protected boolean topToBottom
public Wanderer()
public Wanderer(WandererCallback callback)
public void setCallback(WandererCallback cb)
public WandererCallback getCallback()
public boolean handleEntry(java.io.File file)
file
- File (directory) to start at.protected boolean handleDirectory(java.io.File directory, java.lang.String[] contentNames) throws java.lang.SecurityException
directory
- the directory to handlecontentNames
- an array of Strings representing children of the
directoryjava.lang.SecurityException
public boolean isExhaustiveSearch()
public void setExhaustiveSearch(boolean exhaustiveSearch)
exhaustiveSearch
- set to true if you want to ignore the
handleDirectory and handleFile return values.public boolean isTopToBottom()
public void setTopToBottom(boolean topToBottom)
topToBottom
- public static void main(java.lang.String[] argv)
argv
- paths to files or directories, use -h to get a usage
statement.Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details