storages

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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)
}

func GetFs

func GetFs() Fs

type OsFs

type OsFs struct{}

func NewOsFs

func NewOsFs() *OsFs

func (*OsFs) Open

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

func (*OsFs) Stat

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

Jump to

Keyboard shortcuts

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