Documentation
¶
Overview ¶
Package udf writes UDF 1.02 (ECMA-167) file systems, the format Windows installation ISOs use so that files larger than the ISO9660 4 GiB limit fit. It is paired with package iso to master a bootable UDF + El Torito image.
The writer targets the subset of UDF that Windows accepts (validated by the strict reader in reader.go): a single non-partitioned logical volume, short allocation descriptors, and OSTA CS0 identifiers.
Index ¶
Constants ¶
const SectorSize = 2048
SectorSize is the UDF logical sector / block size used here (and by CD/DVD media): 2048 bytes.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
VolumeID string
// VRSStart is the first Volume Recognition Sequence sector. Zero means 16.
// A bridge image that places ISO9660 descriptors at 16-18 sets this to 19.
VRSStart uint32
}
Options configures a UDF write.
type Result ¶
Result reports the assembled image's total sector count and the location of every regular file, keyed by slash-separated path relative to the root.
type Volume ¶ added in v0.6.2
type Volume struct {
// contains filtered or unexported fields
}
Volume is a parsed + validated UDF volume. Open it with Read.
func Read ¶ added in v0.6.2
Read parses and validates the UDF filesystem in r: the Anchor Volume Descriptor Pointer at sector 256, the Main Volume Descriptor Sequence (Partition + Logical Volume descriptors), and the File Set Descriptor's root directory ICB. It returns an error if any descriptor's tag checksum/CRC/location is wrong, the logical block size is not 2048, or a required structure is missing or unreachable — i.e. the same reasons a strict OS rejects the volume.