resource

package
v0.0.0-...-03afc55 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2015 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourcesVersion = "15w37a"
)

Variables

This section is empty.

Functions

func Init

func Init(tick TickFunc, sync chan<- func())

func IsActive

func IsActive(name string) bool

func LoadZip

func LoadZip(name string) error

func Open

func Open(plugin, name string) (io.ReadCloser, error)

Open searches through all open resource packs for the requested file. If a file exists but fails to open that error will be returned instead of the standard 'file not found' but only if another file couldn't be found to be used in its place.

func OpenAll

func OpenAll(plugin, name string) ([]io.ReadCloser, error)

OpenAll searches through all open resource packs for the requested file. If a file exists but fails to open that error will be returned instead of the standard 'file not found' but only if another file couldn't be found to be used in its place. Unlike Open this will return all matching files

func RemovePack

func RemovePack(name string)
func Search(plugin, path, ext string) []string

Search searches for files that belong to the passed plugin and exist the passed path with the passed extension. This searches all open packs.

Types

type TickFunc

type TickFunc func(progress float64, done bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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