org.apache.commons.io.find
Class FileFinder

java.lang.Object
  extended byorg.apache.commons.io.find.FileFinder
All Implemented Interfaces:
Finder

public class FileFinder
extends java.lang.Object
implements Finder

Finds Files in a file system. Informs FindListeners whenever a Find is made, and returns the finds to the user.


Field Summary
private  java.util.List findListeners
           
 
Fields inherited from interface org.apache.commons.io.find.Finder
CAN_READ, CAN_WRITE, DAYSTART, DEPTH, EMPTY, HIDDEN, IGNORE_HIDDEN_DIRS, INAME, IPATH, IREGEX, MAXDEPTH, MIN, MINDEPTH, NAME, NEWER, NOT, PATH, REGEX, SIZE, TIME, TYPE
 
Constructor Summary
FileFinder()
           
 
Method Summary
 void addFindListener(FindListener fl)
          Add a FindListener.
 java.io.File[] find(java.io.File directory)
          Find all files in the specified directory.
private  java.util.List find(java.io.File directory, FindingFilter filter, boolean depthFirst)
           
 java.io.File[] find(java.io.File directory, java.util.Map options)
           
 void notifyDirectoryFinished(java.io.File directory, java.io.File[] files)
          Notify all FindListeners that a directory has been finished.
 void notifyDirectoryStarted(java.io.File directory)
          Notify all FindListeners that a directory is being started.
 void notifyFileFound(java.io.File directory, java.io.File file)
          Notify FindListeners that a file has been found.
 void removeFindListener(FindListener fl)
          Remove a FindListener.
private static boolean toBoolean(java.lang.Object obj)
           
private static int toInt(java.lang.Object obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

findListeners

private java.util.List findListeners
Constructor Detail

FileFinder

public FileFinder()
Method Detail

toInt

private static int toInt(java.lang.Object obj)

toBoolean

private static boolean toBoolean(java.lang.Object obj)

find

public java.io.File[] find(java.io.File directory)
Find all files in the specified directory.

Specified by:
find in interface Finder

find

public java.io.File[] find(java.io.File directory,
                           java.util.Map options)
Specified by:
find in interface Finder

find

private java.util.List find(java.io.File directory,
                            FindingFilter filter,
                            boolean depthFirst)

addFindListener

public void addFindListener(FindListener fl)
Add a FindListener.

Specified by:
addFindListener in interface Finder

removeFindListener

public void removeFindListener(FindListener fl)
Remove a FindListener.

Specified by:
removeFindListener in interface Finder

notifyDirectoryStarted

public void notifyDirectoryStarted(java.io.File directory)
Notify all FindListeners that a directory is being started.


notifyDirectoryFinished

public void notifyDirectoryFinished(java.io.File directory,
                                    java.io.File[] files)
Notify all FindListeners that a directory has been finished. Supplying the filenames that have been found.


notifyFileFound

public void notifyFileFound(java.io.File directory,
                            java.io.File file)
Notify FindListeners that a file has been found.