public function stream_open($path, $mode, $options, &$openedPath)
    {
        if ($this->handle) {
            return false;
        }
        $useIncludePath = (bool) $options & STREAM_USE_PATH;
        $context = $this->context;
        if ($context === null) {
            $context = \stream_context_get_default();
        }
        self::restorePrev();
        if (\strpos($mode, 'r') !== false && !\file_exists($path)) {
            return false;
        } elseif (\strpos($mode, 'x') !== false && \file_exists($path)) {
            return false;
        }
        $handle = \fopen($path, $mode, $useIncludePath, $context);
        self::register();
        if ($handle === false) {
            return false;
        }
        /*
            Determine opened path
        */
        $meta = \stream_get_meta_data($handle);
        if (!isset($meta['uri'])) {
            throw new \UnexpectedValueException('Uri not in meta data');
        }
        $this->filepath = $openedPath = $meta['uri'];
        $this->handle = $handle;
        return true;
    }