edu.umd.cs.findbugs

Class RecursiveFileSearch

public class RecursiveFileSearch extends 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(String baseDir, FileFilter fileFilter)
Constructor.
Method Summary
Iterator<String>fileNameIterator()
Get an iterator over the files found by the search.
RecursiveFileSearchsearch()
Perform the search.

Constructor Detail

RecursiveFileSearch

public RecursiveFileSearch(String baseDir, 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

fileNameIterator

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

search

public RecursiveFileSearch search()
Perform the search.

Returns: this object

Throws: InterruptedException if the thread is interrupted before the search completes

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