Documentation ¶
Overview ¶
Package zfile file and path operations in daily development
Index ¶
- Variables
- func CopyDir(source string, dest string, ...) (err error)
- func CopyFile(source string, dest string) (err error)
- func DirExist(path string) bool
- func FileExist(path string) bool
- func FileSize(file string) (size string)
- func FileSizeFormat(s uint64) string
- func PathExist(path string) (int, error)
- func ProgramPath(addSlash ...bool) (path string)
- func PutAppend(path string, b []byte) (err error)
- func PutOffset(path string, b []byte, offset int64) (err error)
- func RealPath(path string, addSlash ...bool) (realPath string)
- func RealPathMkdir(path string, addSlash ...bool) string
- func Rmdir(path string, notIncludeSelf ...bool) (ok bool)
- func RootPath() string
- func SafePath(path string, addSlash ...bool) string
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ProjectPath = "."
)
Functions ¶
func CopyDir ¶ added in v0.0.19
func CopyDir(source string, dest string, filterFn ...func(srcFilePath, destFilePath string) bool) (err error)
CopyDir copies the source directory to the dest directory.
func PathExist ¶
PathExist PathExist 1 exists and is a directory path, 2 exists and is a file path, 0 does not exist
func ProgramPath ¶ added in v0.0.19
ProgramPath program directory path
func PutAppend ¶ added in v0.1.19
PutAppend open the specified file and write data at the end of the file
func PutOffset ¶ added in v0.1.19
PutOffset open the specified file and write data from the specified location
func RealPathMkdir ¶ added in v0.0.19
RealPathMkdir get an absolute path, create it if it doesn't exist
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.