java.lang.Object | +--Find
Recursively searches a specific filename in the filesystem subtree
rooted at a given directory.
On UNIX systems, see man find.
| Field Summary | |
private static boolean |
verbose
|
| Constructor Summary | |
Find()
|
|
| Method Summary | |
static void |
find(File directory,
String target)
Prints the absolute paths of all files equal to target
that can be found in the
filesystem subtree rooted at directory
to System.out. |
static void |
main(String[] args)
Looks for a file named args[args.length-1] in the
filesystem subtree rooted at args[args.length-2]. |
private static void |
printUsage()
Calls System.exit(int) as a side effect... |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static boolean verbose
| Constructor Detail |
public Find()
| Method Detail |
private static void printUsage()
System.exit(int) as a side effect...
System.exit(int)
public static void find(File directory,
String target)
target
that can be found in the
filesystem subtree rooted at directory
to System.out.
directory - the root directory to start the search
for file targettarget - the name to be found under directorypublic static void main(String[] args)
args[args.length-1] in the
filesystem subtree rooted at args[args.length-2].
args[0].
args - should match the pattern
[-v] <directory> <name>