public function dir_opendir($uri, $options)
    {
        $this->uri = $uri;

        $path = Util::normalizePath($this->getTarget());

        $this->listing = $this->invoke($this->getFilesystem(), 'listContents', [$path], 'opendir');

        if ($this->listing === false) {
            return false;
        }

        if ( ! $dirlen = strlen($path)) {
            return true;
        }

        // Remove the separator /.
        $dirlen++;

        // Remove directory prefix.
        foreach ($this->listing as $delta => $item) {
            $this->listing[$delta]['path'] = substr($item['path'], $dirlen);
        }

        reset($this->listing);

        return true;
    }