ID EN
OS

ftruncate

Python 3.11

Truncate the file corresponding to file descriptor fd, so that it is at most length bytes in size. As of Python 3.3, this is equivalent to os.truncate(fd, length).

Syntax

PYTHON
os.ftruncate(fd, length, /)

See Also

auditing event Availability