public class DirectoryIterator extends SplFileInfo implements Iterator, Traversable, SeekableIterator
_path
Modifier | Constructor and Description |
---|---|
|
DirectoryIterator(Env env,
StringValue fileName) |
protected |
DirectoryIterator(Path parent,
Path path,
java.lang.String fileName) |
Modifier and Type | Method and Description |
---|---|
protected SplFileInfo |
createCurrent(Env env,
Path parent,
Path path,
java.lang.String fileName) |
Value |
current(Env env)
Returns the current value.
|
protected SplFileInfo |
getCurrent(Env env) |
protected int |
getKey() |
boolean |
isDot(Env env) |
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.
|
__toString, getATime, getBasename, getCTime, getExtension, getFileInfo, getFilename, getGroup, getInode, getLinkTarget, getMTime, getOwner, getPath, getPathInfo, getPathname, getPerms, getRawParent, getRawPath, getRealPath, getSize, getType, isDir, isExecutable, isFile, isLink, isReadable, isWritable, openFile, setFileClass, setInfoClass, toString
public DirectoryIterator(Env env, StringValue fileName)
public Value current(Env env)
Iterator
protected SplFileInfo getCurrent(Env env)
protected SplFileInfo createCurrent(Env env, Path parent, Path path, java.lang.String fileName)
protected int getKey()
public boolean isDot(Env env)
public void next(Env env)
Iterator
public void rewind(Env env)
Iterator
public boolean valid(Env env)
Iterator
public void seek(Env env, int index)
SeekableIterator
seek
in interface SeekableIterator