Truncates a file descriptor to a certain length.
fn ftruncate(fd: i32, offset: i64) -> i32
The file descriptor to truncate.
The new length.
Returns success or an error value.
ftruncate(2)