pub struct SourceVolumeSnapshot {Show 16 fields
pub label: String,
pub signature: u16,
pub attributes: u32,
pub create_date: u32,
pub modify_date: u32,
pub backup_date: u32,
pub checked_date: u32,
pub finder_info: [u32; 8],
pub block_size: u32,
pub total_blocks: u32,
pub file_count: u32,
pub folder_count: u32,
pub boot_blocks: [u8; 1024],
pub catalog_total_blocks: u32,
pub extents_total_blocks: u32,
pub attributes_total_blocks: u32,
}Expand description
Volume-level metadata captured from the source.
Fields§
§label: StringVolume label (decoded UTF-8 of the root folder key name).
signature: u160x482B (HFS+) or 0x4858 (HFSX). Preserved so the target can be re-formatted with the same case-sensitivity behavior.
attributes: u32VH attributes word — clone needs this for the journaled bit, the case-sensitivity bit (HFSX), and a few low-level flags.
create_date: u32§modify_date: u32§backup_date: u32§checked_date: u32§finder_info: [u32; 8]8 × u32 Finder info. finder_info[0] is the blessed System Folder
CNID; other slots are copied verbatim with any CNID remap applied
by the caller in Step 21.
block_size: u32Source allocation block size (informational — clone may pick a different block size on the target).
total_blocks: u32Source total allocation blocks (informational).
file_count: u32§folder_count: u32§boot_blocks: [u8; 1024]First 1024 bytes of the partition. Always zero on macOS-formatted volumes; copied verbatim by clone for round-trip parity.
catalog_total_blocks: u32Source vh.catalog_file.total_blocks. The streamed defrag planner
uses this (with a safety margin) to size the target’s catalog
B-tree so leaf splits don’t run out of free nodes mid-emit.
extents_total_blocks: u32Source vh.extents_file.total_blocks. Inherited as a ceiling for
the target’s extents-overflow file size; the streamed target packs
files contiguously and typically needs less.
attributes_total_blocks: u32Source vh.attributes_file.total_blocks. Zero on volumes without
xattrs; non-zero values flow through to the target’s attributes
B-tree allocation.
Implementations§
Source§impl SourceVolumeSnapshot
impl SourceVolumeSnapshot
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-level metadata from an opened source filesystem. The source is read but never mutated.