vmm_sys_util::write_zeroes

Trait PunchHole

source
pub trait PunchHole {
    // Required method
    fn punch_hole(&mut self, offset: u64, length: u64) -> Result<()>;
}
Expand description

A trait for deallocating space in a file.

Required Methods§

source

fn punch_hole(&mut self, offset: u64, length: u64) -> Result<()>

Replace a range of bytes with a hole.

§Arguments
  • offset: offset of the file where to replace with a hole.
  • length: the number of bytes of the hole to replace with.

Implementations on Foreign Types§

source§

impl PunchHole for File

source§

fn punch_hole(&mut self, offset: u64, length: u64) -> Result<()>

Implementors§