Expand description
UDF (Universal Disk Format) — detection and file-entry traversal.
UDF bridge discs carry both ISO 9660 and UDF structures on the same sectors. The UDF recognition sequence starts at sector 16: each Volume Structure Descriptor is 2048 bytes with a 5-byte identifier at bytes 1-5.
Identifiers: “BEA01” (Extended Area Descriptor), “NSR02” or “NSR03” (OSTA CS0 UDF mark), “TEA01” (Terminating Extended Area Descriptor). NSR02/NSR03 presence is the definitive UDF indicator.
§Full UDF traversal
Descriptor chain: AVDP (LBA 256) → VDS → Partition Descriptor (partition start LBA) + Logical Volume Descriptor (FSD location) → File Set Descriptor (root dir FE LBA) → File Entry → File Identifier Descriptors.
All physical LBAs satisfy: phys_lba = partition_start + logical_block_num.
Structs§
- UdfFile
Entry - A single entry returned by UDF directory traversal.
- UdfState
Enums§
- UdfPartition
Kind - The kind of partition referenced by the UDF logical volume’s file set.
Functions§
- detect_
udf - True if the image has a UDF recognition sequence (NSR02 or NSR03).
- parse_
udf_ state - Try to parse the AVDP → VDS → FSD chain, returning state needed for
directory traversal. Returns
Noneif the image lacks a valid UDF structure. - read_
dir_ at_ lba - Read all non-parent File Identifier Descriptors from the directory whose
File Entry resides at
dir_fe_lba, returning oneUdfFileEntryper child. - read_
fe_ data - Read the data extent of the File Entry at
fe_lba.