Documentation
¶
Index ¶
- func CopyFile(src, dst string, overwrite bool, perm os.FileMode, copyAttr bool) error
- func CopyFileAttr(src, dst string) error
- func CreateFileIfNotExist(path string, content []byte, perm os.FileMode, overwrite bool) error
- func DirExists(path string, create bool, perm os.FileMode) (bool, error)
- func DirName(path string) string
- func FileExists(path string) bool
- func GetAbsPath(path string) (string, error)
- func IsDir(path string) bool
- func IsEmpty(path string) bool
- func IsEmptyDir(path string) bool
- func IsEmptyFile(path string) bool
- func IsExecutable(path string) bool
- func IsFile(path string) bool
- func IsHidden(path string) bool
- func IsReadable(path string) bool
- func IsSymlink(path string) bool
- func IsWritable(path string) bool
- func ParseIP(s string) (net.IP, int)
- func ReadJsonFile(filePath string, data any) error
- func Remove(path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFileIfNotExist ¶
CreateFileIfNotExist 判断文件是否存在,不存在则根据传入的文件内容创建,可设置文件权限,可设置是否覆盖
func ReadJsonFile ¶
ReadJsonFile 读取json文件,并解析到结构体
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.