1 file_example_session_streams.inc public FileExampleSessionStreamWrapper::dir_readdir()

Support for readdir().

Return value

string|bool: The next filename, or FALSE if there are no more files in the directory.

Overrides StreamWrapperInterface::dir_readdir

See also

http://php.net/manual/en/streamwrapper.dir-readdir.php

File

modules/examples/file_example/file_example_session_streams.inc, line 680
Provides a demonstration session:// stream-wrapper.

Class

FileExampleSessionStreamWrapper
Example stream wrapper class to handle session:// streams.

Code

public function dir_readdir() {
  if ($this->directoryPointer < count($this->directoryKeys)) {
    $next = $this->directoryKeys[$this->directoryPointer];
    $this->directoryPointer++;
    return $next;
  }

  return FALSE;
}