afis

package
v0.0.0-...-b390238 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckFileOwner

func CheckFileOwner(file, uname string) bool

检查文件的属主与给定的user是否匹配

func ChmodDirR

func ChmodDirR(dname string, mode os.FileMode) error

递归更改整个目录权限

func ChownDirR

func ChownDirR(dname, uname string) error

递归更改整个目录属主

func ChownFile

func ChownFile(fname, uname string) error

更改文件属主

func CopyDir

func CopyDir(src, dst string) error

复制整个目录

func CopyFile

func CopyFile(src, dst string) error

复制单个文件

func DownloadCode

func DownloadCode(dst, src string) error

从http链接下载代码 http://lp:0124@127.0.0.1/hfp/tst.tar.gz

func GetHostName

func GetHostName() (string, error)

func GetLocalIP

func GetLocalIP() ([]string, error)

func GetMd5String

func GetMd5String(str string) string

func IsDir

func IsDir(path string) bool

判断所给路径是否为文件夹

func IsExists

func IsExists(path string) bool

判断所给路径文件/文件夹是否存在

func IsFile

func IsFile(path string) bool

判断所给路径是否为文件

func IsUser

func IsUser(uname string) bool

判断用户是否存在

func ReadUUIDFromFile

func ReadUUIDFromFile(uuidfile string) (string, error)

func RemoveContents

func RemoveContents(dir string) error

删除目录中的内容

func WalkOnce

func WalkOnce(root string, walkFn filepath.WalkFunc) error

func WriteUUID2File

func WriteUUID2File(uuidfile string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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