testiso

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package testiso builds small ISO9660 images for tests.

Index

Constants

View Source
const BlockSize = 2048

BlockSize is the logical sector size used by generated test ISOs.

Variables

This section is empty.

Functions

func CreateMinimal

func CreateMinimal(tb testing.TB, volumeID, systemID, publisherID string, files []File) []byte

CreateMinimal returns a minimal ISO9660 image with optional root-level files.

func DirectoryRecordLength

func DirectoryRecordLength(name string) int

DirectoryRecordLength returns an even-padded ISO9660 directory record length.

func WriteDirectoryRecord

func WriteDirectoryRecord(tb testing.TB, record []byte, lba, size int, name string)

WriteDirectoryRecord writes an ISO9660 directory record into record.

func WriteFileRecord

func WriteFileRecord(tb testing.TB, record []byte, lba, size int, name string)

WriteFileRecord writes an ISO9660 file record into record.

Types

type File

type File struct {
	Name string
	Data []byte
}

File describes a root-level file to add to a generated test ISO.

Jump to

Keyboard shortcuts

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