disks

package
v0.0.0-...-429085d Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicFormatterOptions

type BasicFormatterOptions interface {
	Metadata() any
	TotalSizeBytes() int64
}

type DiskGeometry

type DiskGeometry struct {
	Name               string `csv:"name"`
	Slug               string `csv:"slug"`
	FirstYearAvailable uint   `csv:"first_year_available"`
	FormFactor         string `csv:"form_factor"`
	IsRemovable        uint   `csv:"is_removable"`

	// BitsPerAddressUnit gives the number of bits in the device's smallest
	// addressible unit of memory. For most devices it's a byte (8). For those
	// where this is not the case, their documentation usually refers to it as a
	// "word". 12 and 18 bits per word are common in older devices.
	BitsPerAddressUnit uint `csv:"bits_per_address_unit"`

	// AddressUnitsPerSector gives the number of address units in a sector, or
	// "record".
	AddressUnitsPerSector uint `csv:"address_units_per_sector"`
	SectorsPerTrack       uint `csv:"sectors_per_track"`

	// TotalDataTracks gives the number of data tracks per head.
	TotalDataTracks uint `csv:"total_data_tracks"`
	HiddenTracks    uint `csv:"hidden_tracks"`
	// Heads gives the number of heads in the device.
	Heads uint   `csv:"heads"`
	Notes string `csv:"notes"`
}

func GetPredefinedDiskGeometry

func GetPredefinedDiskGeometry(slug string) (DiskGeometry, error)

func (*DiskGeometry) TotalSizeBytes

func (g *DiskGeometry) TotalSizeBytes() int64

TotalSizeBytes gives the size of the storage device, rounded up to the nearest byte. This gives the minimum size of the image file.

type FormatterOptionsWithMaxFiles

type FormatterOptionsWithMaxFiles interface {
	BasicFormatterOptions
	MaxFiles() int64
}

type FormatterWithGeometryOptions

type FormatterWithGeometryOptions struct {
	Geometry DiskGeometry
}

Jump to

Keyboard shortcuts

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