fs

package
v0.0.0-...-54c855d Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultFs

type DefaultFs struct {
	Fs afero.Fs
}

func Get

func Get() *DefaultFs

func NewDefaultFs

func NewDefaultFs(dir string) *DefaultFs

func (*DefaultFs) Exists

func (f *DefaultFs) Exists(path string) (bool, error)

func (*DefaultFs) FilePathSeparator

func (f *DefaultFs) FilePathSeparator() string

func (*DefaultFs) Mkdir

func (f *DefaultFs) Mkdir(path string) error

func (*DefaultFs) MkdirAll

func (f *DefaultFs) MkdirAll(path string) error

func (*DefaultFs) ReadFile

func (f *DefaultFs) ReadFile(path string) (string, error)

func (*DefaultFs) Walk

func (f *DefaultFs) Walk(root string, fc func(path string, info os.FileInfo, err error) error) error

func (*DefaultFs) WriteFile

func (f *DefaultFs) WriteFile(path string, data string, force bool) error

type FileSystem

type FileSystem interface {
	ReadFile(path string) (string, error)
	WriteFile(path string, data string, force bool) error
	Mkdir(path string) error
	MkdirAll(path string) error
	FilePathSeparator() string
	Exists(path string) (bool, error)
	Walk(root string, fc func(path string, info os.FileInfo, err error) error) error
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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