public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface
  {
    # Open the file
    $resource = \fopen($filename, $mode);

    return \GuzzleHttp\Psr7\stream_for($resource);
  }
public function createStreamFromFile(string $filename, string $mode = 'r'): StreamInterface
  {
    # Open the file
    $resource = \fopen($filename, $mode);

    return \GuzzleHttp\Psr7\stream_for($resource);
  }
public function createStreamFromFile ( string $ filename , string $ mode = 'r' ) : StreamInterface { # Open the file $ resource = \ fopen ( $ filename , $ mode ) ; return \ GuzzleHttp \ Psr7 \ stream_for ( $ resource ) ; }
Create a stream from an existing file.

The file MUST be opened using the given mode, which may be any mode
supported by the `fopen` function.

The `$filename` MAY be any string supported by `fopen()`.

@param      string           $filename
@param      string           $mode

@return     StreamInterface
Create a stream from an existing file .