

def read(self, name):
    '\n        Read entry for name from storage.\n\n        :returns: content data and content type, as a tuple\n        '
    if (not self.exists(name)):
        self.logger.debug('No file exists for: {}'.format(name))
        return None
    with open(self.compute_path(name)) as file_:
        content_data = file_.read()
        content_type = from_buffer(content_data, mime=True)
        self.logger.debug('Computed content type: {} for: {}'.format(content_type, name))
        return (content_data, content_type)

dataset/ETHPy150Open jessemyers/cheddar/cheddar/index/storage.py DistributionStorage.read/original