Versions in this module Expand all Collapse all v0 v0.5.1 Jan 15, 2023 Changes in this version + var ErrFileNotFound = fmt.Errorf("datapack: file not found") + func RegisterDriver(key string, value func() Driver) + func Timestamp() string + type Driver interface + Close func() error + Init func(at string) (Opts, error) + List func() []string + ReadFile func(at string) (File, error) + WriteFile func(at string) (WriteFile, error) + type File io.ReadCloser + type List struct + Files []string + type Loader struct + Volumes []*Pack + func Open(directory string) (*Loader, error) + func (ld *Loader) Close() + func (ld *Loader) Exists(path string) bool + func (ld *Loader) List() []string + func (ld *Loader) NewTextLoader(prefix, name string) (*TextLoader, error) + func (ld *Loader) ReadFile(path string) (io.ReadCloser, error) + type Opts uint64 + const None + const Read + const Write + type Pack struct + func Author(cfg PackConfig) (*Pack, error) + func AuthorDir(dir string, cfg PackConfig) (*Pack, error) + func OpenPack(path string) (*Pack, error) + func (p *Pack) Delete() error + func (p *Pack) Exists(path string) bool + func (p *Pack) FolderExists(path string) bool + func (p *Pack) FolderList(path string) []string + func (p *Pack) ReadBytes(path string) ([]byte, error) + func (p *Pack) WriteBytes(path string, data []byte) error + func (p *Pack) ZipToFile(filename string) error + type PackConfig struct + Author string + ClientScripts []string + Depends []string + Description string + Name string + OverrideTables []string + ServerScripts []string + Version string + type TextLoader struct + Decoder *text.Decoder + Loader *Loader + Paths []packText + func (tl *TextLoader) Scan(out interface{}) error + type WriteFile io.WriteCloser