src/Filesystem/Adapter/Polyfill/StreamedReadingTrait.php
public function readStream($path)
    {
        if ( ! $data = $this->read($path)) {
            return false;
        }

        $stream = \fopen('php://temp', 'w+b');
        \fwrite($stream, $data['contents']);
        \rewind($stream);
        $data['stream'] = $stream;
        unset($data['contents']);

        return $data;
    }
public function readStream($path)
    {
        if ( ! $data = $this->read($path)) {
            return false;
        }

        $stream = \fopen('php://temp', 'w+b');
        \fwrite($stream, $data['contents']);
        \rewind($stream);
        $data['stream'] = $stream;
        unset($data['contents']);

        return $data;
    }
public function readStream ( $ path ) { if ( ! $ data = $ this -> read ( $ path ) ) { return false ; } $ stream = \ fopen ( 'php://temp' , 'w+b' ) ; \ fwrite ( $ stream , $ data [ 'contents' ] ) ; \ rewind ( $ stream ) ; $ data [ 'stream' ] = $ stream ; unset ( $ data [ 'contents' ] ) ; return $ data ; }
Reads a file as a stream.

@param string $path

@return array|false

@see \Hail\Filesystem\ReadInterface::readStream()
Reads a file as a stream .