io

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2020 License: BSD-2-Clause, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(name string, s Filesystem) ([]byte, error)

Types

type Atlas

type Atlas struct {
	// contains filtered or unexported fields
}

func ParseAtlas

func ParseAtlas(b []byte) (*Atlas, error)

func (*Atlas) Get

func (a *Atlas) Get(name string) *ebiten.Image

type Container

type Container interface {
	Len() int64
	FS() Filesystem
	Load(name string) chan struct{}
	Unload(name string) (bool, error)
	LoadAll(names []string) (progress chan float64, done chan struct{})
	UnloadAll()
	Get(name string) ([]byte, error)
	GetImage(name string) (image.Image, error)
	GetAtlas(name string) (*Atlas, error)
}

func NewContainer

func NewContainer(ctx context.Context, fs Filesystem) Container

type File

type File interface {
	io.Closer
	io.Reader
	io.Seeker
	Stat() (FileInfo, error)
}

File interface is almost a copy of http.File

type FileInfo

type FileInfo interface {
	Size() int64
	IsDir() bool
}

FileInfo interface

type Filesystem

type Filesystem interface {
	Open(name string) (File, error)
	Stat(name string) (FileInfo, error)
}

Filesystem interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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