Skip to main content

SourceCatalogSnapshot

Struct SourceCatalogSnapshot 

Source
pub struct SourceCatalogSnapshot {
    pub volume: SourceVolumeSnapshot,
    pub dirs: Vec<SourceDirSnapshot>,
    pub files: Vec<SourceFileSnapshot>,
    pub hardlinks: Vec<SourceHardlinkSnapshot>,
    pub dir_hardlinks: Vec<SourceDirHardlinkSnapshot>,
}
Expand description

Full capture of a source HFS+/HFSX volume: volume metadata plus every directory and file record. Catalog thread records are not captured — the target writer recreates them from scratch.

Fields§

§volume: SourceVolumeSnapshot§dirs: Vec<SourceDirSnapshot>§files: Vec<SourceFileSnapshot>

Every captured file row, both user-visible files and the per-inode iNode<N> rows under HFS+ Private Data. Inodes carry is_inode = true and an inode_num; replay must emit them through the dedicated hardlink-inode helper rather than as user-tree files.

§hardlinks: Vec<SourceHardlinkSnapshot>

Hardlink stub rows. Each references one is_inode=true entry in files by source CNID.

§dir_hardlinks: Vec<SourceDirHardlinkSnapshot>

Directory-hardlink stub rows. Each references one is_dir_inode=true entry in dirs by source CNID.

Implementations§

Source§

impl SourceCatalogSnapshot

Source

pub fn capture<R: Read + Seek>( fs: &mut HfsPlusFilesystem<R>, ) -> Result<Self, FilesystemError>

Capture volume + every directory + every file record from the source catalog. Walks the leaf-node chain of the catalog B-tree (skipping thread records) and reads each file’s data + resource fork into the snapshot. Index nodes are ignored.

File hardlinks (Step 17) are captured into a separate SourceHardlinkSnapshot list and the inode rows under \0\0\0\0HFS+ Private Data are flagged with is_inode = true. Directory hardlinks (Step 18) still trip the Unsupported guard.

Trait Implementations§

Source§

impl Clone for SourceCatalogSnapshot

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SourceCatalogSnapshot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.