Method lrs::file::File::set_len

Changes the length of the file.

Syntax

impl File {
    fn set_len(&self, len: i64) -> Result<(), Errno>
}

Arguments

NameDescription
len

The new length of the file.

Remarks

If the length is larger than the current length, a hole is created. Such holes can be inspected with the seek method.

See also