backend

package
v0.0.0-...-64a5475 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	Stat(string) (os.FileInfo, error) // should throw error for directories
	Open(string) (io.ReadCloser, error)
	Create(string) (io.WriteCloser, error)
	Walk(root string, walkFn filepath.WalkFunc) error
}

type FS

type FS struct {
	Path string
}

FS Implements Backend for the filesystem

func (*FS) Create

func (be *FS) Create(path string) (io.WriteCloser, error)

func (*FS) Open

func (be *FS) Open(path string) (io.ReadCloser, error)

func (*FS) Stat

func (be *FS) Stat(path string) (os.FileInfo, error)

func (*FS) Walk

func (be *FS) Walk(p string, f filepath.WalkFunc) error

Jump to

Keyboard shortcuts

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