function SessionStreamWrapper::stream_stat

Same name and namespace in other branches
  1. 3.x modules/stream_wrapper_example/src/StreamWrapper/SessionStreamWrapper.php \Drupal\stream_wrapper_example\StreamWrapper\SessionStreamWrapper::stream_stat()
  2. 8.x-1.x stream_wrapper_example/src/StreamWrapper/SessionStreamWrapper.php \Drupal\stream_wrapper_example\StreamWrapper\SessionStreamWrapper::stream_stat()

Support for fstat().

Return value

array An array with file status, or FALSE in case of an error - see fstat() for a description of this array.

Overrides PhpStreamWrapperInterface::stream_stat

See also

http://php.net/manual/en/streamwrapper.stream-stat.php

File

modules/stream_wrapper_example/src/StreamWrapper/SessionStreamWrapper.php, line 548

Class

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

Namespace

Drupal\stream_wrapper_example\StreamWrapper

Code

public function stream_stat() {
    return [
        'size' => strlen($this->sessionContent),
    ];
}