

def _delete_objects_not_in_list(self, cont, object_prefix=''):
    '\n        Finds all the objects in the specified container that are not present\n        in the self._local_files list, and deletes them.\n        '
    objnames = set(cont.get_object_names(prefix=object_prefix, full_listing=True))
    localnames = set(self._local_files)
    to_delete = list(objnames.difference(localnames))
    self._sync_summary['deleted'] += len(to_delete)
    self._thread = self.bulk_delete(cont, to_delete, async=True)

dataset/ETHPy150Open rackspace/pyrax/pyrax/object_storage.py StorageClient._delete_objects_not_in_list/original