rustix::fs

Function fallocate

Source
pub fn fallocate<Fd: AsFd>(
    fd: Fd,
    mode: FallocateFlags,
    offset: u64,
    len: u64,
) -> Result<()>
Available on crate feature fs only.
Expand description

fallocate(fd, mode, offset, len)—Adjusts file allocation.

This is a more general form of posix_fallocate, adding a mode argument which modifies the behavior. On platforms which only support posix_fallocate and not the more general form, no FallocateFlags values are defined so it will always be empty.

§References