fs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 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 ReadJSON

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

func WriteFile

func WriteFile(name string, writeFunc func(writer io.Writer) error) error

func WriteFileNotExist

func WriteFileNotExist(name string, writeFunc func(writer io.Writer) error) 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
	WriteFile(name string, writeFunc func(writer io.Writer) error) error
	WriteFileNotExist(name string, writeFunc func(writer io.Writer) error) error
	WriteJSON(path string, data interface{}) error
	ReadJSON(path string, data interface{}) error
}

FileSystem ...

Jump to

Keyboard shortcuts

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