'Override `ObjectStore`\'s stub; delete the file or folder on disk.'

def delete(self, obj, entire_dir=False, **kwargs):

    path = self.get_filename(obj, **kwargs)
    extra_dir = kwargs.get('extra_dir', None)
    obj_dir = kwargs.get('obj_dir', False)
    try:
        if (entire_dir and (extra_dir or obj_dir)):
            shutil.rmtree(path)
            return True
        if self.exists(obj, **kwargs):
            os.remove(path)
            return True
    except OSError as ex:
        log.critical(('%s    delete    error    %s' % (self._get_filename(obj, **kwargs), ex)))
    return False
