zfile

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 6 Imported by: 32

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootPath = RealPath(".", true)

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 CopyFile added in v0.0.19

func CopyFile(source string, dest string) (err error)

CopyFile copies the source file to the dest file.

func DirExist

func DirExist(path string) bool

DirExist Is it an existing directory

func FileExist

func FileExist(path string) bool

FileExist Is it an existing file?

func FileSize

func FileSize(file string) (size string)

FileSize file size

func FileSizeFormat

func FileSizeFormat(s uint64) string

FileSizeFormat Format file size

func PathExist

func PathExist(path string) (int, error)

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

func ProgramPath(addSlash ...bool) (path string)

ProgramPath program directory path

func RealPath added in v0.0.19

func RealPath(path string, addSlash ...bool) (realPath string)

RealPath get an absolute path

func RealPathMkdir added in v0.0.19

func RealPathMkdir(path string, addSlash ...bool) string

RealPathMkdir get an absolute path, create it if it doesn't exist

func Rmdir added in v0.0.19

func Rmdir(path string, notIncludeSelf ...bool) (ok bool)

Rmdir rmdir,support to keep the current directory

func SafePath added in v0.0.23

func SafePath(path string, addSlash ...bool) string

SafePath get an safe absolute path

Types

This section is empty.

Jump to

Keyboard shortcuts

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