MCPcopy Index your code
hub / github.com/aws/aws-cli / read

Method read

awscli/s3transfer/__init__.py:281–290  ·  view source on GitHub ↗
(self, amount=None)

Source from the content-addressed store, hash-verified

279 return min(max_chunk_size, requested_size)
280
281 def read(self, amount=None):
282 if amount is None:
283 amount_to_read = self._size - self._amount_read
284 else:
285 amount_to_read = min(self._size - self._amount_read, amount)
286 data = self._fileobj.read(amount_to_read)
287 self._amount_read += len(data)
288 if self._callback is not None and self._callback_enabled:
289 self._callback(len(data))
290 return data
291
292 def enable_callback(self):
293 self._callback_enabled = True

Callers 1

readMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected