You are here

public function StreamWrapper::stream_stat in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/psr7/src/StreamWrapper.php \GuzzleHttp\Psr7\StreamWrapper::stream_stat()

File

vendor/guzzlehttp/psr7/src/StreamWrapper.php, line 97

Class

StreamWrapper
Converts Guzzle streams into PHP stream resources.

Namespace

GuzzleHttp\Psr7

Code

public function stream_stat() {
  static $modeMap = [
    'r' => 33060,
    'r+' => 33206,
    'w' => 33188,
  ];
  return [
    'dev' => 0,
    'ino' => 0,
    'mode' => $modeMap[$this->mode],
    'nlink' => 0,
    'uid' => 0,
    'gid' => 0,
    'rdev' => 0,
    'size' => $this->stream
      ->getSize() ?: 0,
    'atime' => 0,
    'mtime' => 0,
    'ctime' => 0,
    'blksize' => 0,
    'blocks' => 0,
  ];
}