diskm8/disk/int.go
April Ayres-Griffiths 75d42c4597 initial commit
2018-01-20 11:05:04 +11:00

34 lines
621 B
Go

package disk
import "time"
type CatalogEntryType int
const (
CETUnknown CatalogEntryType = iota
CETBinary
CETBasicApplesoft
CETBasicInteger
CETPascal
CETText
CETData
CETGraphics
)
type CatalogEntry interface {
Size() int // file size in bytes
Name() string
NameUnadorned() string
Date() time.Time
Type() CatalogEntryType
}
type DiskImage interface {
IsValid() (bool, DiskFormat, SectorOrder)
GetCatalog(path string, pattern string) ([]CatalogEntry, error)
ReadFile(fd CatalogEntry) (int, []byte, error)
StoreFile(fd CatalogEntry) error
GetUsedBitmap() ([]bool, error)
Nibblize() ([]byte, error)
}