FindBugs™ 1.3.9

edu.umd.cs.findbugs
Class RecursiveFileSearch

java.lang.Object
  extended by edu.umd.cs.findbugs.RecursiveFileSearch

public class RecursiveFileSearch
extends java.lang.Object

Recursively search a directory, its subdirectories, etc. Note that the search algorithm uses a worklist, so its implementation does not use recursive method calls.

Author:
David Hovemeyer

Constructor Summary
RecursiveFileSearch(java.lang.String baseDir, java.io.FileFilter fileFilter)
          Constructor.
 
Method Summary
 java.util.Iterator<java.lang.String> fileNameIterator()
          Get an iterator over the files found by the search.
 java.util.List<java.lang.String> getDirectoriesScanned()
           
 RecursiveFileSearch search()
          Perform the search.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecursiveFileSearch

public RecursiveFileSearch(java.lang.String baseDir,
                           java.io.FileFilter fileFilter)
Constructor.

Parameters:
baseDir - the base directory for the search
fileFilter - chooses files to add to the results, and subdirectories to continue the search in
Method Detail

search

public RecursiveFileSearch search()
                           throws java.lang.InterruptedException
Perform the search.

Returns:
this object
Throws:
java.lang.InterruptedException - if the thread is interrupted before the search completes

fileNameIterator

public java.util.Iterator<java.lang.String> fileNameIterator()
Get an iterator over the files found by the search. The full path names of the files are returned.


getDirectoriesScanned

public java.util.List<java.lang.String> getDirectoriesScanned()

FindBugs™ 1.3.9

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.