Edit File by line
/home/barbar84/www/wp-conte.../plugins/updraftp.../vendor/guzzleht.../psr7/src
File: LazyOpenStream.php
<?php
[0] Fix | Delete
[1] Fix | Delete
namespace GuzzleHttp\Psr7;
[2] Fix | Delete
[3] Fix | Delete
use Psr\Http\Message\StreamInterface;
[4] Fix | Delete
[5] Fix | Delete
/**
[6] Fix | Delete
* Lazily reads or writes to a file that is opened only after an IO operation
[7] Fix | Delete
* take place on the stream.
[8] Fix | Delete
*
[9] Fix | Delete
* @final
[10] Fix | Delete
*/
[11] Fix | Delete
class LazyOpenStream implements StreamInterface
[12] Fix | Delete
{
[13] Fix | Delete
use StreamDecoratorTrait;
[14] Fix | Delete
[15] Fix | Delete
/** @var string File to open */
[16] Fix | Delete
private $filename;
[17] Fix | Delete
[18] Fix | Delete
/** @var string */
[19] Fix | Delete
private $mode;
[20] Fix | Delete
[21] Fix | Delete
/**
[22] Fix | Delete
* @param string $filename File to lazily open
[23] Fix | Delete
* @param string $mode fopen mode to use when opening the stream
[24] Fix | Delete
*/
[25] Fix | Delete
public function __construct($filename, $mode)
[26] Fix | Delete
{
[27] Fix | Delete
$this->filename = $filename;
[28] Fix | Delete
$this->mode = $mode;
[29] Fix | Delete
}
[30] Fix | Delete
[31] Fix | Delete
/**
[32] Fix | Delete
* Creates the underlying stream lazily when required.
[33] Fix | Delete
*
[34] Fix | Delete
* @return StreamInterface
[35] Fix | Delete
*/
[36] Fix | Delete
protected function createStream()
[37] Fix | Delete
{
[38] Fix | Delete
return Utils::streamFor(Utils::tryFopen($this->filename, $this->mode));
[39] Fix | Delete
}
[40] Fix | Delete
}
[41] Fix | Delete
[42] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function