Documentation ¶
Index ¶
- Variables
- func CopyDir(src string, dest string, mkDir bool, errorStop bool) error
- func CopyFile(src, dest string, ensureDir bool) (errRet error)
- func CopyFileWithLinkRemain(src, dest string, ensureDir bool) (errRet error)
- func EnsureDir(dirPth string) error
- func EnsureDirOfFilePth(filePth string) error
- func MustReadFile(pth string) []byte
- func ReadFile(pth string) ([]byte, error)
- func SaveFile(srcStream io.Reader, dest string, override bool) (errRet error)
- func Walk(root string, fn filepath.WalkFunc, opts ...WalkOptionFunc) error
- type WalkOption
- type WalkOptionFunc
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 CopyFileWithLinkRemain ¶
func EnsureDirOfFilePth ¶
func MustReadFile ¶
Types ¶
type WalkOption ¶
type WalkOption struct {
MaxConcurrent uint
}
type WalkOptionFunc ¶
type WalkOptionFunc func(opt WalkOption) WalkOption
Click to show internal directories.
Click to hide internal directories.