Skip to main content

SparseImageFile

Struct SparseImageFile 

Source
pub struct SparseImageFile { /* private fields */ }
Expand description

Mac OS sparse image (.sparseimage) file.

Implementations§

Source§

impl SparseImageFile

Source

pub fn new() -> Self

Creates a file.

Source

pub fn get_block_size(&self) -> u32

Retrieves the block size.

Source

pub fn get_bytes_per_sector(&self) -> u16

Retrieves the bytes per sector.

Source

pub fn get_data_stream(&self) -> Option<DataStreamReference>

Retrieves a data stream.

Source

pub fn get_encryption_type(&self) -> Option<&CdsaEncrEncryptionType>

Retrieves the encryption type.

Source

pub fn get_media_size(&self) -> u64

Retrieves the media size.

Source

pub fn is_locked(&self) -> bool

Determines if the (encrypted) image is locked.

Source

pub fn read_data_stream( &mut self, data_stream: &DataStreamReference, ) -> Result<(), ErrorTrace>

Reads a file from a data stream.

Source

pub fn unlock( &mut self, credentials: &[CdsaEncrCredential], ) -> Result<bool, ErrorTrace>

Unlocks a locked (encrypted) file.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.