MCPcopy
hub / github.com/aws/aws-cli / read

Method read

awscli/s3transfer/utils.py:514–524  ·  view source on GitHub ↗
(self, amount=None)

Source from the content-addressed store, hash-verified

512 return min(max_chunk_size, requested_size)
513
514 def read(self, amount=None):
515 amount_left = max(self._size - self._amount_read, 0)
516 if amount is None:
517 amount_to_read = amount_left
518 else:
519 amount_to_read = min(amount_left, amount)
520 data = self._fileobj.read(amount_to_read)
521 self._amount_read += len(data)
522 if self._callbacks is not None and self._callbacks_enabled:
523 invoke_progress_callbacks(self._callbacks, len(data))
524 return data
525
526 def signal_transferring(self):
527 self.enable_callback()

Callers 15

read_sdist_extrasFunction · 0.45
_rewrite_shebangFunction · 0.45
_get_b64_sha256Function · 0.45
get_install_requiresFunction · 0.45
streamMethod · 0.45
scanMethod · 0.45
get_fileFunction · 0.45
get_key_contentsMethod · 0.45

Calls 1

Tested by 2

streamMethod · 0.36
get_key_contentsMethod · 0.36