public function deleteTree(
        $repositoryId,
        $folderId,
        $allVersions = true,
        UnfileObject $unfileObjects = null,
        $continueOnFailure = false,
        ExtensionDataInterface $extension = null
    ) {
        $url = $this->getObjectUrl($repositoryId, $folderId);
        $url->getQuery()->modify(
            [
                Constants::CONTROL_CMISACTION => Constants::CMISACTION_DELETE_TREE,
                Constants::PARAM_FOLDER_ID => $folderId,
                Constants::PARAM_ALL_VERSIONS => $allVersions ? 'true' : 'false',
                Constants::PARAM_CONTINUE_ON_FAILURE => $continueOnFailure ? 'true' : 'false'
            ]
        );

        if ($unfileObjects !== null) {
            $url->getQuery()->modify([Constants::PARAM_UNFILE_OBJECTS => (string) $unfileObjects]);
        }

        return $this->getJsonConverter()->convertFailedToDelete($this->postJson($url));
    }