wyvern.util
Class FileFinder

java.lang.Object
  extended bywyvern.util.FileFinder

public class FileFinder
extends java.lang.Object

A java version of perl's File::Find. Searches under the passed directory, calling you back with every file found.

The callback gets passed a File representing each file found. You can call getAbsolutePath() to get the full path, getName() to get the filename, and getParent() to get the directory the file is in.

Version:
1.0, Dec 30, 2002
Author:
Steve Yegge

Nested Class Summary
static interface FileFinder.Callback
           
 
Constructor Summary
FileFinder(FileFinder.Callback callback)
          Constructs a new FileFinder with the specified callback.
 
Method Summary
 void find(java.io.File f)
          Starts the search from the specified directory
 void find(java.lang.String path)
          Starts the search from the specified directory.
static void main(java.lang.String[] args)
          Tests it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileFinder

public FileFinder(FileFinder.Callback callback)
Constructs a new FileFinder with the specified callback.

Method Detail

find

public void find(java.lang.String path)
Starts the search from the specified directory.


find

public void find(java.io.File f)
Starts the search from the specified directory.;


main

public static void main(java.lang.String[] args)
Tests it.