fs

package
v1.14.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	Path string `bson:"path" json:"path" yaml:"path"`
}

type FS

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

func New

func New(opts Conf) *FS

func (*FS) Delete

func (fs *FS) Delete(name string) error

Delete deletes given file from FS. It returns storage.ErrNotExist if a file isn't exists

func (*FS) FileStat

func (fs *FS) FileStat(name string) (inf storage.FileInfo, err error)

func (*FS) Files

func (fs *FS) Files(suffix string) ([][]byte, error)

func (*FS) List

func (fs *FS) List(prefix string) ([]storage.FileInfo, error)

func (*FS) Save

func (fs *FS) Save(name string, data io.Reader, _ int) error

func (*FS) SourceReader

func (fs *FS) SourceReader(name string) (io.ReadCloser, error)

Jump to

Keyboard shortcuts

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