dat

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatFile

type DatFile struct {
	Name    string `xml:"header>name"`
	Version string `xml:"header>version"`
	Roms    []Rom  `xml:"game>rom"`
}

func Read

func Read(xmlbytes []byte) (df DatFile, err error)

Read a DatFile from bytes of XML data

func ReadFromFile

func ReadFromFile(path string) (df DatFile, err error)

Read a DatFile from an XML datfile on disk

func ReadFromIncluded

func ReadFromIncluded() (df DatFile, err error)

func (*DatFile) FindBySerial

func (df *DatFile) FindBySerial(serial string) (results []Rom)

Find entries based on a serial, such as NSME or CZLP

type Rom

type Rom struct {
	Name   string `xml:"name,attr"`
	Size   int    `xml:"size,attr"`
	Serial string `xml:"serial,attr"`
	CRC32  string `xml:"crc32,attr"`
	MD5    string `xml:"md5,attr"`
	SHA1   string `xml:"sha1,attr"`
	Status string `xml:"status"`
}

Jump to

Keyboard shortcuts

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