Documentation ¶
Index ¶
- func CrashOnWrite(reason string)
- func Init() error
- func MoveAwayState(kind StateKind, name string) error
- func OSCreate(name string) (writeFile, error)
- func OSOpen(name string) (readFile, error)
- func ReadDir(purpose string) ([]string, error)
- func ReadState(kind StateKind, name string) ([]byte, error)
- func SetFilesDir(dir string)
- func WriteState(kind StateKind, name string, data []byte) error
- type ReadSeekCloser
- type StateKind
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CrashOnWrite ¶ added in v1.4.72
func CrashOnWrite(reason string)
CrashOnWrite prevents further writing to any state.
This is used as a safety mechanism so demo playback cannot have any influence on the system, and to ensure that demo playback's write attempts are properly redirected to memory buffers for regression testing.
func MoveAwayState ¶
MoveAwayState renames a detected-to-be-broken state file so it will not be used again.
func SetFilesDir ¶ added in v1.2.229
func SetFilesDir(dir string)
SetFilesDir does nothing (on Android it'd be used to notify the Go code where to store its data).
Types ¶
type ReadSeekCloser ¶
ReadSeekCloser is a typical file interface.
func Load ¶
func Load(purpose, name string) (ReadSeekCloser, error)
func LoadPath ¶ added in v1.2.4
func LoadPath(purpose, name string) (ReadSeekCloser, error)
Click to show internal directories.
Click to hide internal directories.