os.ftruncate() 裁剪文件描述符fd对应的文件, 它最大不能超过文件大小。
Unix上可用。
ftruncate()方法语法格式如下:
os.ftruncate(fd, length)Python3 os.fsync() 方法Python3 os.getcwd() 方法