Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. StreamWrapper.php

function StreamWrapper::stream_stat

Return value

array{ dev: int, ino: int, mode: int, nlink: int, uid: int, gid: int, rdev: int, size: int, atime: int, mtime: int, ctime: int, blksize: int, blocks: int }|false

File

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

Class

StreamWrapper
Converts Guzzle streams into PHP stream resources.

Namespace

GuzzleHttp\Psr7

Code

public function stream_stat() {
    if ($this->stream
        ->getSize() === null) {
        return false;
    }
    static $modeMap = [
        'r' => 33060,
        'rb' => 33060,
        'r+' => 33206,
        'w' => 33188,
        'wb' => 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,
    ];
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal