|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecteu.infomas.util.FileIterator
public final class FileIterator
FileIterator enables iteration over all files in a directory and all
its sub directories.
Usage:
FileIterator iter = new FileIterator(new File("./src"));
File f;
while ((f = iter.next()) != null) {
// do something witgh f
}
| Constructor Summary | |
|---|---|
FileIterator(File... filesOrDirectories)
Create a new FileIterator using the specified 'filesOrDirectories' as root. |
|
| Method Summary | |
|---|---|
File |
getFile()
Return the last returned file or null if no more files are available. |
File |
next()
Return the next File object or null if no more files are
available. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileIterator(File... filesOrDirectories)
FileIterator using the specified 'filesOrDirectories' as root.
filesOrDirectories - Zero or more File objects, which are iterated
in the specified order (depth first)| Method Detail |
|---|
public File getFile()
null if no more files are available.
next()
public File next()
throws IOException
File object or null if no more files are
available.
IOExceptiongetFile()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||