(self, pos=None)
| 785 | return pos |
| 786 | |
| 787 | def truncate(self, pos=None): |
| 788 | self._checkClosed() |
| 789 | self._checkWritable() |
| 790 | |
| 791 | # Flush the stream. We're mixing buffered I/O with lower-level I/O, |
| 792 | # and a flush may be necessary to synch both views of the current |
| 793 | # file state. |
| 794 | self.flush() |
| 795 | |
| 796 | if pos is None: |
| 797 | pos = self.tell() |
| 798 | # XXX: Should seek() be used, instead of passing the position |
| 799 | # XXX directly to truncate? |
| 800 | return self.raw.truncate(pos) |
| 801 | |
| 802 | ### Flush and close ### |
| 803 |
nothing calls this directly
no test coverage detected