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
impl SourceCatalogSnapshot
Sourcepub fn capture<R: Read + Seek>(
fs: &mut HfsPlusFilesystem<R>,
) -> Result<Self, FilesystemError>
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.