Function lrs::syscall::ftruncate

Truncates a file descriptor to a certain length.

Syntax

fn ftruncate(fd: i32, offset: i64) -> i32

Arguments

NameDescription
fd

The file descriptor to truncate.

offset

The new length.

Return value

Returns success or an error value.

See also