voldemort.utils
Class DirectoryIterator
java.lang.Object
com.google.common.collect.UnmodifiableIterator<T>
com.google.common.collect.AbstractIterator<java.io.File>
voldemort.utils.DirectoryIterator
- All Implemented Interfaces:
- java.util.Iterator<java.io.File>, ClosableIterator<java.io.File>
public class DirectoryIterator
- extends com.google.common.collect.AbstractIterator<java.io.File>
- implements ClosableIterator<java.io.File>
An iterator over all the files contained in a set of directories, including
any subdirectories
Method Summary |
void |
close()
Close the iterator |
protected java.io.File |
computeNext()
|
static void |
main(java.lang.String[] args)
Command line method to walk the directories provided on the command line
and print out their contents |
Methods inherited from class com.google.common.collect.AbstractIterator |
endOfData, hasNext, next, peek |
Methods inherited from class com.google.common.collect.UnmodifiableIterator |
remove |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Iterator |
hasNext, next, remove |
DirectoryIterator
public DirectoryIterator(java.lang.String... basis)
DirectoryIterator
public DirectoryIterator(java.io.File... basis)
computeNext
protected java.io.File computeNext()
- Specified by:
computeNext
in class com.google.common.collect.AbstractIterator<java.io.File>
close
public void close()
- Description copied from interface:
ClosableIterator
- Close the iterator
- Specified by:
close
in interface ClosableIterator<java.io.File>
main
public static void main(java.lang.String[] args)
- Command line method to walk the directories provided on the command line
and print out their contents
- Parameters:
args
- Directory names
Jay Kreps, Roshan Sumbaly, Alex Feinberg, Bhupesh Bansal, Lei Gao, Chinmay Soman, Vinoth Chandar, Zhongjie Wu