Open the file in bytes mode, read it, and close the file.
(self)
| 969 | return io.open(self, mode, buffering, encoding, errors, newline) |
| 970 | |
| 971 | def read_bytes(self): |
| 972 | """ |
| 973 | Open the file in bytes mode, read it, and close the file. |
| 974 | """ |
| 975 | with self.open(mode='rb', buffering=0) as f: |
| 976 | return f.read() |
| 977 | |
| 978 | def read_text(self, encoding=None, errors=None, newline=None): |
| 979 | """ |