Function lrs::syscall::truncate

Truncates a file.

Syntax

fn truncate(file: &CStr, len: i64) -> i32

Arguments

NameDescription
file

The path of the file to truncate.

len

The new length of the file.

Return value

Returns success or an error value.

See also