com.caucho.quercus.lib.spl
Class DirectoryIterator

java.lang.Object
  extended by com.caucho.quercus.lib.spl.SplFileInfo
      extended by com.caucho.quercus.lib.spl.DirectoryIterator
All Implemented Interfaces:
Iterator, SeekableIterator, Traversable
Direct Known Subclasses:
FilesystemIterator

public class DirectoryIterator
extends SplFileInfo
implements Iterator, Traversable, SeekableIterator


Field Summary
 
Fields inherited from class com.caucho.quercus.lib.spl.SplFileInfo
_path
 
Constructor Summary
  DirectoryIterator(Env env, StringValue fileName)
           
protected DirectoryIterator(Path path)
           
 
Method Summary
protected  DirectoryIterator createCurrentIterator(Env env, Path path)
           
 Value current(Env env)
          Returns the current value.
protected  DirectoryIterator getCurrent(Env env)
           
protected  DirectoryIterator getCurrentRaw()
           
protected  int getKey()
           
 Value key(Env env)
          Returns the current key.
 void next(Env env)
          Advances to the next row.
 void rewind(Env env)
          Rewinds the iterator so it is at the first row.
 void seek(Env env, int index)
          Seeks to the given offset.
 boolean valid(Env env)
          Returns true if the iterator currently points to a valid row.
 
Methods inherited from class com.caucho.quercus.lib.spl.SplFileInfo
__toString, getATime, getBasename, getCTime, getExtension, getFileInfo, getFilename, getGroup, getInode, getLinkTarget, getMTime, getOwner, getPath, getPathInfo, getPathname, getPerms, getRealPath, getSize, getType, init, isDir, isExecutable, isFile, isLink, isReadable, isWritable, openFile, setFileClass, setInfoClass, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectoryIterator

public DirectoryIterator(Env env,
                         StringValue fileName)

DirectoryIterator

protected DirectoryIterator(Path path)
Method Detail

current

public Value current(Env env)
Description copied from interface: Iterator
Returns the current value.

Specified by:
current in interface Iterator

createCurrentIterator

protected DirectoryIterator createCurrentIterator(Env env,
                                                  Path path)

getCurrent

protected DirectoryIterator getCurrent(Env env)

getCurrentRaw

protected DirectoryIterator getCurrentRaw()

getKey

protected int getKey()

key

public Value key(Env env)
Description copied from interface: Iterator
Returns the current key.

Specified by:
key in interface Iterator

next

public void next(Env env)
Description copied from interface: Iterator
Advances to the next row.

Specified by:
next in interface Iterator

rewind

public void rewind(Env env)
Description copied from interface: Iterator
Rewinds the iterator so it is at the first row.

Specified by:
rewind in interface Iterator

valid

public boolean valid(Env env)
Description copied from interface: Iterator
Returns true if the iterator currently points to a valid row.

Specified by:
valid in interface Iterator

seek

public void seek(Env env,
                 int index)
Description copied from interface: SeekableIterator
Seeks to the given offset.

Specified by:
seek in interface SeekableIterator