Package edu.umd.cs.findbugs
Class RecursiveFileSearch
- java.lang.Object
-
- 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
Constructors Constructor Description RecursiveFileSearch(java.lang.String baseDir, java.io.FileFilter fileFilter)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
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()
-
-