udf

package
v0.0.0-...-ffbe2be Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Diagnose

func Diagnose(path string) error

Diagnose opens an ISO and walks the entire UDF chain, printing every intermediate value so broken offsets are immediately visible.

func Probe

func Probe(r io.ReaderAt) (bool, error)

Probe scans the Volume Recognition Sequence for UDF presence. Returns true only if NSR02/NSR03 is found AND sector 256 contains a structurally valid Anchor Volume Descriptor Pointer (AVDP).

Two checks are required to avoid false positives on ISOs that carry the UDF VRS markers (BEA01/NSR02/TEA01) purely for compatibility — as oscdimg and several other tools do — but have no actual UDF filesystem:

  1. Tag ID at bytes [0:2] of sector 256 must be 2 (AVDP).
  2. Descriptor tag checksum (ECMA-167 7.2) must be valid: the sum of all 16 tag bytes with the checksum byte (offset 4) treated as 0 must equal the value stored at offset 4. Random ISO data will almost never satisfy this constraint.

Types

type Volume

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

Volume implements diskiso.Volume for UDF (ECMA-167 / OSTA UDF 1.x–2.x).

func NewVolume

func NewVolume(r io.ReaderAt) (*Volume, error)

func (*Volume) Label

func (v *Volume) Label() string

func (*Volume) Open

func (v *Volume) Open(filePath string) (fs.File, error)

func (*Volume) ReadDir

func (v *Volume) ReadDir(dirPath string) ([]fs.DirEntry, error)

func (*Volume) ReadFile

func (v *Volume) ReadFile(filePath string) ([]byte, error)
func (v *Volume) Readlink(filePath string) (string, error)

func (*Volume) Stat

func (v *Volume) Stat(filePath string) (os.FileInfo, error)

func (*Volume) Type

func (v *Volume) Type() string

Jump to

Keyboard shortcuts

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