public function deleteTree($allVersions, UnfileObject $unfile, $continueOnFailure = true)
    {
        $failed = $this->getBinding()->getObjectService()->deleteTree(
            $this->getRepositoryId(),
            $this->getId(),
            $allVersions,
            $unfile,
            $continueOnFailure
        );

        if (count($failed->getIds()) === 0) {
            $this->getSession()->removeObjectFromCache($this);
        }

        return $failed;
    }