MCPcopy Index your code
hub / github.com/python/cpython / truncate

Method truncate

Lib/_pyio.py:367–373  ·  view source on GitHub ↗

Truncate file to size bytes. Size defaults to the current IO position as reported by tell(). Return the new size.

(self, pos=None)

Source from the content-addressed store, hash-verified

365 return self.seek(0, 1)
366
367 def truncate(self, pos=None):
368 """Truncate file to size bytes.
369
370 Size defaults to the current IO position as reported by tell(). Return
371 the new size.
372 """
373 self._unsupported("truncate")
374
375 ### Flush and close ###
376

Callers 4

truncateMethod · 0.45
truncateMethod · 0.45
truncateMethod · 0.45
truncateMethod · 0.45

Calls 1

_unsupportedMethod · 0.95

Tested by

no test coverage detected