fs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Root string
}

Config is the configuration for Storage.

type Storage

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

Storage is a filesystem storage.

func NewStorage

func NewStorage(cfg Config) *Storage

NewStorage returns a new filesystem storage.

func (*Storage) Delete

func (fs *Storage) Delete(ctx context.Context, path string) error

Delete deletes path.

func (*Storage) Open

func (fs *Storage) Open(ctx context.Context, path string) (io.ReadCloser, error)

Open opens path for reading.

func (*Storage) Save

func (fs *Storage) Save(ctx context.Context, content io.Reader, path string) error

Save saves content to path.

func (*Storage) Stat

func (fs *Storage) Stat(ctx context.Context, path string) (*storage.Stat, error)

Stat returns path metadata.

Jump to

Keyboard shortcuts

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