fs

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(path string) bool

func MkdirP

func MkdirP(path string) error

func ReadFile added in v0.1.1

func ReadFile(name string, readFunc ReadFunc) error

func ReadJSON

func ReadJSON(path string, data interface{}) error

func WriteFile

func WriteFile(name string, writeFunc WriteFunc) error

func WriteFileNotExist

func WriteFileNotExist(name string, writeFunc WriteFunc) error

func WriteJSON

func WriteJSON(path string, data interface{}) error

Types

type File

type File interface {
	io.Closer
	io.Reader
	io.ReaderAt
	io.Seeker
	io.Writer
	Stat() (os.FileInfo, error)
}

File ...

type FileSystem

type FileSystem interface {
	Exists(path string) bool
	MkdirP(path string) error
	ReadJSON(path string, data interface{}) error
	WriteJSON(path string, data interface{}) error
	WriteFileNotExist(name string, writeFunc WriteFunc) error
	ReadFile(name string, readFunc ReadFunc) error
	WriteFile(name string, writeFunc WriteFunc) error
}

FileSystem ...

type ReadFunc added in v0.1.1

type ReadFunc func(reader io.Reader) error

type WriteFunc added in v0.1.1

type WriteFunc func(writer io.Writer) error

Jump to

Keyboard shortcuts

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