storage

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reset added in v1.0.8

func Reset()

func SetFs

func SetFs(newFs Fs)

Types

type File

type File interface {
	io.Closer
	io.Reader
	io.ReaderAt
	io.Seeker
	io.Writer
	io.WriterAt
	Name() string
	Readdir(count int) ([]os.FileInfo, error)
	Readdirnames(n int) ([]string, error)
	Stat() (os.FileInfo, error)
	Sync() error
	Truncate(size int64) error
	WriteString(s string) (ret int, err error)
}

type Fs

type Fs interface {
	Open(name string) (File, error)
	Stat(name string) (os.FileInfo, error)
	IsNotExist(err error) bool
	Getwd() (dir string, err error)
	Walk(root string, walkFn filepath.WalkFunc) error
}

func GetFs

func GetFs() Fs

type OsFs

type OsFs struct{}

func NewOsFs

func NewOsFs() *OsFs

func (*OsFs) Getwd

func (fs *OsFs) Getwd() (dir string, err error)

func (*OsFs) IsNotExist

func (fs *OsFs) IsNotExist(err error) bool

func (*OsFs) Open

func (fs *OsFs) Open(name string) (File, error)

func (*OsFs) Stat

func (fs *OsFs) Stat(name string) (os.FileInfo, error)

func (*OsFs) Walk added in v1.0.8

func (fs *OsFs) Walk(root string, walkFn filepath.WalkFunc) (err error)

Jump to

Keyboard shortcuts

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