fop

package
v0.0.0-...-86b5199 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFileConflict     = errors.New("conflicts with existing file")
	ErrFileRemoveFailed = errors.New("remove files failed")
)
View Source
var DefaultWalkOption = WalkOption{
	MaxConcurrent: 1,
}
View Source
var MkdirAll = os.MkdirAll

Functions

func CopyDir

func CopyDir(src string, dest string, mkDir bool, errorStop bool) error

func CopyFile

func CopyFile(src, dest string, ensureDir bool) (errRet error)

func CopyFileWithLinkRemain

func CopyFileWithLinkRemain(src, dest string, ensureDir bool) (errRet error)

func EnsureDir

func EnsureDir(dirPth string) error

func EnsureDirOfFilePth

func EnsureDirOfFilePth(filePth string) error

func MustReadFile

func MustReadFile(pth string) []byte

func ReadFile

func ReadFile(pth string) ([]byte, error)

func SaveFile

func SaveFile(srcStream io.Reader, dest string, override bool) (errRet error)

func Walk

func Walk(root string, fn filepath.WalkFunc, opts ...WalkOptionFunc) error

Types

type WalkOption

type WalkOption struct {
	MaxConcurrent uint
}

type WalkOptionFunc

type WalkOptionFunc func(opt WalkOption) WalkOption

Jump to

Keyboard shortcuts

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