Versions in this module Expand all Collapse all v2 v2.0.1 Apr 3, 2023 v2.0.0 Apr 3, 2023 Changes in this version + const DefaultPermCopy + const DefaultPermOpen + const Separator + var DefaultReadBuffer = 1024 + func Abs(path string) string + func Basename(path string) string + func Chdir(dir string) (err error) + func Chmod(path string, mode os.FileMode) (err error) + func Copy(src string, dst string) error + func CopyDir(src string, dst string) (err error) + func CopyFile(src, dst string) (err error) + func Create(path string) (*os.File, error) + func Dir(path string) string + func DirNames(path string) ([]string, error) + func Exists(path string) bool + func Ext(path string) string + func ExtName(path string) string + func FormatSize(raw int64) string + func GetBytes(path string) []byte + func GetBytesByTwoOffsets(reader io.ReaderAt, start int64, end int64) []byte + func GetBytesByTwoOffsetsByPath(path string, start int64, end int64) []byte + func GetBytesTilChar(reader io.ReaderAt, char byte, start int64) ([]byte, int64) + func GetBytesTilCharByPath(path string, char byte, start int64) ([]byte, int64) + func GetBytesWithCache(path string, duration ...time.Duration) []byte + func GetContents(path string) string + func GetContentsWithCache(path string, duration ...time.Duration) string + func GetNextCharOffset(reader io.ReaderAt, char byte, start int64) int64 + func GetNextCharOffsetByPath(path string, char byte, start int64) int64 + func Glob(pattern string, onlyNames ...bool) ([]string, error) + func Home(names ...string) (string, error) + func IsDir(path string) bool + func IsEmpty(path string) bool + func IsFile(path string) bool + func IsReadable(path string) bool + func IsWritable(path string) bool + func Join(paths ...string) string + func MTime(path string) time.Time + func MTimestamp(path string) int64 + func MTimestampMilli(path string) int64 + func MainPkgPath() string + func Mkdir(path string) (err error) + func Move(src string, dst string) (err error) + func Name(path string) string + func Open(path string) (*os.File, error) + func OpenFile(path string, flag int, perm os.FileMode) (*os.File, error) + func OpenWithFlag(path string, flag int) (*os.File, error) + func OpenWithFlagPerm(path string, flag int, perm os.FileMode) (*os.File, error) + func PutBytes(path string, content []byte) error + func PutBytesAppend(path string, content []byte) error + func PutContents(path string, content string) error + func PutContentsAppend(path string, content string) error + func Pwd() string + func ReadLines(file string, callback func(line string) error) error + func ReadLinesBytes(file string, callback func(bytes []byte) error) error + func ReadableSize(path string) string + func RealPath(path string) string + func Remove(path string) (err error) + func Rename(src string, dst string) error + func ReplaceDir(search, replace, path, pattern string, recursive ...bool) error + func ReplaceDirFunc(f func(path, content string) string, path, pattern string, recursive ...bool) error + func ReplaceFile(search, replace, path string) error + func ReplaceFileFunc(f func(path, content string) string, path string) error + func ScanDir(path string, pattern string, recursive ...bool) ([]string, error) + func ScanDirFile(path string, pattern string, recursive ...bool) ([]string, error) + func ScanDirFileFunc(path string, pattern string, recursive bool, handler func(path string) string) ([]string, error) + func ScanDirFunc(path string, pattern string, recursive bool, handler func(path string) string) ([]string, error) + func Search(name string, prioritySearchPaths ...string) (realPath string, err error) + func SelfDir() string + func SelfName() string + func SelfPath() string + func Size(path string) int64 + func SizeFormat(path string) string + func SortFiles(files []string) []string + func Stat(path string) (os.FileInfo, error) + func StrToSize(sizeStr string) int64 + func Temp(names ...string) string + func Truncate(path string, size int) (err error)