def exists(self, bbox_or_slices):
"""
Produce a summary of whether all the requested chunks exist.
bbox_or_slices: accepts either a Bbox or a tuple of slices representing
the requested volume.
Returns: { chunk_file_name: boolean, ... }
"""
if type(bbox_or_slices) is Bbox:
requested_bbox = bbox_or_slices
else:
(requested_bbox, steps, channel_slice) = self.__interpret_slices(bbox_or_slices)
realized_bbox = self.__realized_bbox(requested_bbox)
cloudpaths = self.__chunknames(realized_bbox, self.bounds, self.key, self.underlying)
with Storage(self.layer_cloudpath, progress=self.progress) as storage:
existence_report = storage.files_exist(cloudpaths)
return existence_report
评论列表
文章目录