fs

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// default directory/permission constants
	DirPerm  = 0o755
	FilePerm = 0o644
)

Variables

View Source
var OSOpenFile = func(name string, flag int, perm os.FileMode) (io.ReadWriteCloser, error) {
	return os.OpenFile(name, flag, perm)
}
View Source
var OpenFile = OSOpenFile

Functions

func New

func New(o opts.Opts) (impl.Impl, error)

Types

type FS

type FS struct {
	Base string
	Ext  string

	DirPerm  os.FileMode
	FilePerm os.FileMode
}

func (*FS) Close

func (f *FS) Close() error

func (*FS) Del

func (f *FS) Del(k string) error

func (*FS) Ensure

func (f *FS) Ensure() error

func (*FS) Get

func (f *FS) Get(k string) ([]byte, error)

func (*FS) Keys

func (f *FS) Keys() ([]string, error)

func (*FS) Set

func (f *FS) Set(k string, v []byte) error

Jump to

Keyboard shortcuts

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