public function openStream(string $mode): StreamInterface
    {
        try {
            $res = Thrower::call('fopen', $this, $mode);
        } catch (\Exception $e) {
            throw new \RuntimeException(sprintf('Unable to open %s using mode "%s"', $this, $mode), 0, $e);
        }

        return StreamFactoryDiscovery::find()->createStream($res);
    }
public function openStream(string $mode): StreamInterface
    {
        try {
            $res = Thrower::call('fopen', $this, $mode);
        } catch (\Exception $e) {
            throw new \RuntimeException(sprintf('Unable to open %s using mode "%s"', $this, $mode), 0, $e);
        }

        return StreamFactoryDiscovery::find()->createStream($res);
    }
public function openStream ( string $ mode ) : StreamInterface { try { $ res = Thrower :: call ( 'fopen' , $ this , $ mode ) ; } catch ( \ Exception $ e ) { throw new \ RuntimeException ( sprintf ( 'Unable to open %s using mode "%s"' , $ this , $ mode ) , 0 , $ e ) ; } return StreamFactoryDiscovery :: find ( ) -> createStream ( $ res ) ; }
Create a stream for the file.

@param string $mode

@return StreamInterface
Create a stream for the file .