cache

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache manages the central mod file cache

func New

func New(basePath string) *Cache

New creates a new cache manager

func (*Cache) Delete

func (c *Cache) Delete(gameID, sourceID, modID, version string) error

Delete removes a cached mod version

func (*Cache) Exists

func (c *Cache) Exists(gameID, sourceID, modID, version string) bool

Exists checks if a mod version is cached

func (*Cache) GetFilePath

func (c *Cache) GetFilePath(gameID, sourceID, modID, version, relativePath string) string

GetFilePath returns the full path to a cached file

func (*Cache) ListFiles

func (c *Cache) ListFiles(gameID, sourceID, modID, version string) ([]string, error)

ListFiles returns all files in a cached mod version

func (*Cache) ModPath

func (c *Cache) ModPath(gameID, sourceID, modID, version string) string

ModPath returns the path where a mod version's files are stored

func (*Cache) Size

func (c *Cache) Size(gameID, sourceID, modID, version string) (int64, error)

Size returns the total size of cached files for a mod version

func (*Cache) Store

func (c *Cache) Store(gameID, sourceID, modID, version, relativePath string, content []byte) error

Store saves a file to the cache

Jump to

Keyboard shortcuts

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