You are here

public function S3fsStream::dir_readdir in S3 File System 4.0.x

Same name and namespace in other branches
  1. 8.3 src/StreamWrapper/S3fsStream.php \Drupal\s3fs\StreamWrapper\S3fsStream::dir_readdir()
  2. 8.2 src/StreamWrapper/S3fsStream.php \Drupal\s3fs\StreamWrapper\S3fsStream::dir_readdir()

Read entry from directory handle.

This method is called in response to readdir().

Return value

string|false Should return string representing the next filename, or FALSE if there is no next file. Note, the return value will be casted to string.

Overrides PhpStreamWrapperInterface::dir_readdir

See also

readdir()

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

File

src/StreamWrapper/S3fsStream.php, line 1127

Class

S3fsStream
Defines a Drupal s3 (s3://) stream wrapper class.

Namespace

Drupal\s3fs\StreamWrapper

Code

public function dir_readdir() {

  // phpcs:enable
  $current = current($this->dir);
  if ($current) {
    next($this->dir);
  }
  return $current;
}