util

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IsCygwin bool

Functions

func CopyFile

func CopyFile(src, dst string) (int64, error)

CopyFile 复制文件

func GetAbsolutePath

func GetAbsolutePath(path string) (result string)

GetAbsolutePath 获取真实的绝对路径,并把路径分割符换成'/'

func GetCurrentDirectory

func GetCurrentDirectory() string

GetCurrentDirectory 获取当前路径

func GetNowStr

func GetNowStr() string

func IsDir

func IsDir(path string) (bool, error)

IsDir 检查路径是否是文件夹

func Mkdir

func Mkdir(dirPath string) (string, error)

Mkdir 创建目录

func PathContains

func PathContains(paths []string, filePath string) (bool, string)

PathContains 判断是否是src路径,如果是则返回src路径

func PathExists

func PathExists(path string) (bool, error)

PathExists 检查路径是否存在

func ReadFile added in v0.0.2

func ReadFile(filePath string) []byte

ReadFile 读取xml文件为[]byte

func ReadFileToSet added in v0.0.2

func ReadFileToSet(filePath string) set.Set

ReadFileToSet 按行读取文件为set

func WinPathToCyg

func WinPathToCyg(winPath string) string

WinPathToCyg 将windows路径转换为cygwin路径

Types

This section is empty.

Jump to

Keyboard shortcuts

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