fsystem

package
v0.0.0-...-d8300b5 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Fs   = afero.NewOsFs()
	Mem  = afero.NewMemMapFs()
	FsRo = afero.NewReadOnlyFs(Fs)
)

Functions

func CreateFile

func CreateFile(pathToFile string) (afero.File, error)

func FileExists

func FileExists(pathToFile string) (fs bool, mem bool, err error)

func ReadAll

func ReadAll(reader io.Reader) ([]byte, error)

func ReadFile

func ReadFile(Fs afero.Fs, pathToFile string) ([]byte, error)

func ReadFsFile

func ReadFsFile(pathToFile string) ([]byte, error)

func ReadMemFile

func ReadMemFile(pathToFile string) ([]byte, error)

func ReadProperties

func ReadProperties(pathToFile string) (out map[string]string, err error)

func ReadRoFile

func ReadRoFile(pathToFile string) ([]byte, error)

func WriteFile

func WriteFile(fs afero.Fs, pathToFile string, data []byte) error

func WriteFsFile

func WriteFsFile(pathToFile string, data []byte) error

func WriteMemFile

func WriteMemFile(pathToFile string, data []byte) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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