Skip to main content

ApfsHandle

Struct ApfsHandle 

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

Handle to an opened APFS volume. Type-erased over the underlying reader (temp file vs in-memory).

Implementations§

Source§

impl ApfsHandle

Source

pub fn list_directory(&mut self, path: &str) -> Result<Vec<DirEntry>>

List a directory

Source

pub fn read_file(&mut self, path: &str) -> Result<Vec<u8>>

Read a file into memory

Source

pub fn read_file_to<W: Write>( &mut self, path: &str, writer: &mut W, ) -> Result<u64>

Stream a file to a writer (low memory)

Source

pub fn stat(&mut self, path: &str) -> Result<FileStat>

Get file metadata

Source

pub fn walk(&mut self) -> Result<Vec<WalkEntry>>

Walk all files

Source

pub fn exists(&mut self, path: &str) -> Result<bool>

Check if a path exists

Source

pub fn volume_info(&self) -> &VolumeInfo

Get volume information

Source

pub fn open_pkg(&mut self, pkg_path: &str) -> Result<PkgReader<Cursor<Vec<u8>>>>

Open a .pkg file found on the APFS volume (reads into memory)

Source

pub fn open_pkg_streaming( &mut self, pkg_path: &str, ) -> Result<PkgReader<BufReader<File>>>

Open a .pkg file by streaming to a temp file (low memory)

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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.