fs

package
v0.0.0-...-8e5a076 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrImmutable = fmt.Errorf("immutable")
View Source
var ErrNotFound = fmt.Errorf("not found")

Functions

This section is empty.

Types

type Filesystem

type Filesystem interface {
	Read(key string) ([]byte, error)
	Write(key string, data []byte) error
}

type Layered

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

func NewLayered

func NewLayered(layers ...Filesystem) *Layered

func (*Layered) Pop

func (fs *Layered) Pop()

Pop removes the top layer from the filesystem stack

func (*Layered) Push

func (fs *Layered) Push(layer Filesystem)

Push adds a layer to the top of the filesystem stack

func (*Layered) Read

func (fs *Layered) Read(key string) ([]byte, error)

func (*Layered) Write

func (fs *Layered) Write(key string, data []byte) error

type Local

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

func NewLocal

func NewLocal(root string) *Local

func (*Local) Read

func (fs *Local) Read(key string) ([]byte, error)

func (*Local) Write

func (fs *Local) Write(key string, data []byte) error

Jump to

Keyboard shortcuts

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