Versions in this module Expand all Collapse all v1 v1.0.0 Nov 6, 2022 Changes in this version + func CopyDir(src, dst string, overwrite ...bool) error + func CopyFile(src, dst string, overwrite ...bool) error + func CreateFileFromByteFn(filename string, overwrite bool, f func() []byte) error + func CreateFileFromBytes(file string, overwrite bool, content []byte) error + func CreateFileFromReader(file string, overwrite bool, reader io.Reader) error + func CreateFileFromString(file string, overwrite bool, content string) error + func CreateFileFromWriterFunc(file string, overwrite bool, fn func(w io.Writer) error) error + func DeleteDir(dir string) error + func DeleteDirFn(dir string, fn func() error) error + func DeleteFile(file string) error + func DeleteFileFn(file string, fn func() error) error + func Extension(filePath string) string + func Getwd() string + func IfExists(path string, fn func(path string) error) error + func IfIsDir(path string, f func() error) error + func IfIsFile(path string, f func(p string) error) error + func IfIsRegular(path string, fn func() error) error + func IfNotExists(path string, fn func(path string) error) error + func IsDir(path string) bool + func IsEmptyDir(path string) bool + func IsExists(path string) bool + func IsFile(path string) bool + func IsNotExists(path string) bool + func IsRegular(path string) bool + func IsSubDir(parent, child string) bool + func IsSymlink(path string) bool + func MatchPattern(patterns []string, name string) bool + func MkdirIfNotExist(dir string) error + func WhenFileRead(filename string, callback func([]byte) error) error + type Chunk struct + Number uint + Offset uint64 + Size uint64 + type SplitFile struct + func NewSplitFile(path string) (*SplitFile, error) + func NewSplitFileBySize(size uint64) (*SplitFile, error) + func (c *SplitFile) SplitFileByChunkNum(chunkNum uint) ([]Chunk, error) + func (c *SplitFile) SplitFileByChunkSize(chunkSize uint) ([]Chunk, error)