Class DirectoryIterator

java.lang.Object
org.codehaus.commons.compiler.util.iterator.ProducerIterator<File>
org.codehaus.commons.compiler.util.iterator.DirectoryIterator
All Implemented Interfaces:
Iterator<File>

public class DirectoryIterator extends ProducerIterator<File>
An Iterator<File> that finds regular files who's names are accepted by the fileNameFilter and
  • exist in the given rootDirectory, or
  • exist in any subdirectory of the rootDirectory that is accepted by the directoryNameFilter.

The returned iterator will throw a DirectoryIterator.DirectoryNotListableException when one of the relevant directories cannot be listed.