Class Find

java.lang.Object
  |
  +--Find

public class Find
extends Object

Recursively searches a specific filename in the filesystem subtree rooted at a given directory.
On UNIX systems, see man find.

Author:
Christian Liebchen

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

verbose

private static boolean verbose
Constructor Detail

Find

public Find()
Method Detail

printUsage

private static void printUsage()
Calls System.exit(int) as a side effect...

See Also:
System.exit(int)

find

public 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.

Parameters:
directory - the root directory to start the search for file target
target - the name to be found under directory

main

public static void main(String[] args)
Looks for a file named args[args.length-1] in the filesystem subtree rooted at args[args.length-2].
Optionally provides verbose output, depending on args[0].

Parameters:
args - should match the pattern [-v] <directory> <name>