udf

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package udf implements the UDF (Universal Disk Format) engine behind the image.Filesystem contract: ECMA-167 volume/file structures constrained by the OSTA UDF specification (revision 2.01). fsforge writes a read-only UDF image (2048-byte blocks, a single Type-1 read-only partition, File Entries with short allocation descriptors) that the Linux kernel mounts and udfinfo reads; the reader parses such an image back into the tree, so UDF doubles as a conversion source.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UDF

type UDF struct {
	// contains filtered or unexported fields
}

UDF is the UDF 2.01 engine, implementing image.Filesystem. Format produces a read-only UDF image (2048-byte blocks, a single Type-1 read-only partition, File Entries with short allocation descriptors) that the Linux kernel mounts and udfinfo reads. Open parses such an image back into the tree, so UDF doubles as a conversion source; the opened image is read-only, so its Finalize reports that it cannot be re-finalized in place.

func New

func New(deps image.Deps) *UDF

New returns a UDF engine wired with deps. A nil Clock/UUID is replaced with the host defaults.

func (*UDF) Format

func (e *UDF) Format(dev device.Device, p image.Params) (image.Image, error)

Format starts a fresh UDF image on dev.

func (*UDF) Open

func (e *UDF) Open(dev device.Device) (image.Image, error)

Open reads an existing UDF image into the agnostic tree, so UDF can be a conversion source. It follows the anchor at block 256 to the Volume Descriptor Sequence, locates the partition and File Set Descriptor, and walks the directory hierarchy. Both File Entries and Extended File Entries and the short/long/in-ICB allocation forms are understood. The returned image is read-only; rebuild via Convert to change it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL