src/Stream.php
public function meta($key = null)
    {
        if ($this->_resource === null && $this->_filename) {
            $this->_resource = fopen($this->_filename, $this->_mode);
        }
        if (!$this->valid()) {
            throw new RuntimeException('Invalid resource.');
        }
        $meta = stream_get_meta_data($this->_resource);

        if ($key) {
            return isset($meta[$key]) ? $meta[$key] : null;
        }
        return $meta;
    }
public function meta($key = null)
    {
        if ($this->_resource === null && $this->_filename) {
            $this->_resource = fopen($this->_filename, $this->_mode);
        }
        if (!$this->valid()) {
            throw new RuntimeException('Invalid resource.');
        }
        $meta = stream_get_meta_data($this->_resource);

        if ($key) {
            return isset($meta[$key]) ? $meta[$key] : null;
        }
        return $meta;
    }
public function meta ( $ key = null ) { if ( $ this -> _resource === null && $ this -> _filename ) { $ this -> _resource = fopen ( $ this -> _filename , $ this -> _mode ) ; } if ( ! $ this -> valid ( ) ) { throw new RuntimeException ( 'Invalid resource.' ) ; } $ meta = stream_get_meta_data ( $ this -> _resource ) ; if ( $ key ) { return isset ( $ meta [ $ key ] ) ? $ meta [ $ key ] : null ; } return $ meta ; }
Get stream meta data.

@param  string $key A specific meta data or `null` to get all meta data.
Possibles values are:
`'uri'`          _string_ : the URI/filename associated with this stream.
`'mode'`         _string_ : the type of access required for this stream.
`'wrapper_type'` _string_ : the protocol wrapper implementation layered over the stream.
`'stream_type'`  _string_ : the underlying implementation of the stream.
`'unread_bytes'` _integer_: the number of bytes contained in the PHP's own internal buffer.
`'seekable'`     _boolean_: `true` means the current stream can be seeked.
`'eof'`          _boolean_: `true` means the stream has reached end-of-file.
`'blocked'`      _boolean_: `true` means the stream is in blocking IO mode.
`'timed_out'`    _boolean_: `true` means stream timed out on the last read call.
@return mixed
Get stream meta data .