xfile

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseName

func BaseName(filename string) string

获取基本文件名

func CopyFile

func CopyFile(src, dst string) int64

复制文件

func DirName

func DirName(filename string) string

获取路径名

func ExtName

func ExtName(filename string) string

获取扩展名,不带"."

func FileIsExist

func FileIsExist(path string) bool

判断文件是否存在

func FormatPath

func FormatPath(path string) string

替换路径多余分隔符,统一为 "/"

func FormatPathSys

func FormatPathSys(path string) string

替换路径多余分隔符,统一为系统分隔符

func GetCurrentPath

func GetCurrentPath() string

获取当前exe路径

func GetDirList

func GetDirList(dirpath string) []string

获取目录文件列表

func GetFileList

func GetFileList(dirpath string) []string

获取文件列表

func IsDir

func IsDir(path string) bool

判断是否文件夹

func Mkdir

func Mkdir(path string) bool

创建目录

func MkdirAll

func MkdirAll(path string) bool

创建目录

func ReadFile

func ReadFile(filename string) []byte

func ReadFileStr

func ReadFileStr(filename string) string

func SelfDir

func SelfDir() string

SelfDir gets compiled executable file directory

func SelfPath

func SelfPath() string

SelfPath gets compiled executable file absolute path

func WriteFile

func WriteFile(filename string, data []byte, _mode ...string) bool

func WriteFileStr

func WriteFileStr(filename string, data string, _mode ...string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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