Method lrs::file::File::collapse

Removes a range from the file and closes the gap.

Syntax

impl File {
    fn collapse<R>(&self, range: R) -> Result<(), Errno>
        where R: BoundedRange<u64>,
}

Arguments

NameDescription
range

The range that should be removed.

Remarks

The range must probably begin and end at a multiple of the block size but this depends on the filesystem. This function cannot be used if the range reaches the end of the file. Use set_len for this purpose.

See also