public function cd($dir = '')
    {
        if ($dir == '' || substr($dir, 0, 1) !== '/') {
            $dir = $this->dir . '/' . $dir;
        }

        $this->errorHandler->start();
        if (($dir = $this->driver->realpath($this->resource, $dir)) !== false) {
            $this->dir = $dir;
            $this->errorHandler->stop();

            return true;
        }

        $this->errorHandler->stop();

        return false;
    }