pub fn loopback_create(
        &mut self,
        path: Box<Path>,
        size_in_bytes: u64,
    ) -> Result<DeviceEntity, LoopbackError> {
        use std::{fs::File, io::Write};

        File::create(&path)
            .map_err(LoopbackError::FileCreate)?
            .set_len(size_in_bytes)
            .map_err(LoopbackError::FileSetLen)?;

        self.loopback_open(path)
    }
/// Create a new loopback device, instantly.
Create a new loopback device, instantly.
Create a new loopback device instantly .
pub fn loopback_create(
        &mut self,
        path: Box<Path>,
        size_in_bytes: u64,
    ) -> Result<DeviceEntity, LoopbackError> {
        use std::{fs::File, io::Write};
        File::create(&path)
            .map_err(LoopbackError::FileCreate)?
            .set_len(size_in_bytes)
            .map_err(LoopbackError::FileSetLen)?;
        self.loopback_open(path)
    }
pub fn loopback_create ( & mut self , path : Box < Path > , size_in_bytes : u64 , ) -> Result < DeviceEntity , LoopbackError > { use std :: { fs :: File , io :: Write } ; File :: create ( & path ) . map_err ( LoopbackError :: FileCreate ) ? . set_len ( size_in_bytes ) . map_err ( LoopbackError :: FileSetLen ) ? ; self . loopback_open ( path ) }
Create a new loopback device, instantly.
Create a new loopback device instantly .
&mut self
path
Box<Path>
size_in_bytes
u64
&mut self
path
Box<Path>
size_in_bytes
u64