public stream_open ( string $path, string $mode, integer $options, string &$openedPath ) : boolean | ||
$path | string | specifies the URL that was passed to the original function. |
$mode | string | mode used to open the file, as detailed for `fopen()`. |
$options | integer | additional flags set by the streams API. |
$openedPath | string | real opened path. |
Результат | boolean | whether operation is successful. |
public function stream_open($path, $mode, $options, &$openedPath)
{
if ($options & STREAM_USE_PATH) {
$openedPath = $path;
}
$this->parsePath($path);
switch ($mode) {
case 'r':
return $this->prepareDownload();
case 'w':
return $this->prepareUpload();
}
return false;
}