Open the file in bytes mode, read it, and close the file.
(self)
| 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 | """ |