Truncate the file corresponding to path, so that it is at most length bytes in size.
os.truncate(path, length)