diskm8/disk/int.go

34 lines
621 B
Go
Raw Normal View History

2018-01-20 00:05:04 +00:00
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)
}