public function open($path = null, $mode = null, $options = null, &$openedPath = null)
    {
        $context = [];
        if (is_resource($this->context)) {
            $context = stream_context_get_options($this->context);
        }
        $resource = 'php://temp';
        if (isset($context[static::PROTOCOL]['resource'])) {
            $resource = $context[static::PROTOCOL]['resource'];
        }
        if (is_resource($this->resource)) {
            fclose($this->resource);
        }
        try {
            $this->setResource($resource, $mode);
        } catch (InvalidArgumentException $ex) {
            return false;
        }

        return true;
    }