public function savePath($path = null)
    {
        if ($path === null) {
            return session_save_path();
        }
        if ($this->isOpen) {
            throw new \InvalidArgumentException('The session has already been opened.');
        }
        if (!is_string($path)) {
            throw new \InvalidArgumentException('Session path must be null or a string');
        }
        if (!is_dir($path)) {
            throw new \InvalidArgumentException("Path not found: {$path}");
        }
        session_save_path($path);
    }