MCPcopy Index your code
hub / github.com/RustPython/RustPython / read_bytes

Method read_bytes

Lib/pathlib/__init__.py:773–778  ·  view source on GitHub ↗

Open the file in bytes mode, read it, and close the file.

(self)

Source from the content-addressed store, hash-verified

771 return io.open(self, mode, buffering, encoding, errors, newline)
772
773 def read_bytes(self):
774 """
775 Open the file in bytes mode, read it, and close the file.
776 """
777 with self.open(mode='rb', buffering=0) as f:
778 return f.read()
779
780 def read_text(self, encoding=None, errors=None, newline=None):
781 """

Calls 2

openMethod · 0.95
readMethod · 0.45

Tested by 15

__enter__Method · 0.36
test_read_bytesMethod · 0.36
test_spec_path_openMethod · 0.36
test_child_path_openMethod · 0.36
test_orphan_path_openMethod · 0.36
executeMethod · 0.36
test_read_bytesMethod · 0.36