file

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(filePath string) error

Create 创建文件

func GetExt

func GetExt(filePath string) string

GetExt 获取文件扩展名

func GetName

func GetName(filePath string) string

GetName 获取文件名

func GetNameWithoutExt

func GetNameWithoutExt(filePath string) string

GetNameWithoutExt 获取不带扩展名的文件名

func IsDir

func IsDir(path string) bool

IsDir 判断一个路径是否为目录

func IsExsit

func IsExsit(path string) bool

IsExsit 文件或目录是否存在

func IsFile

func IsFile(path string) bool

IsFile 判断一个路径是否为文件

func ReadAll

func ReadAll(filePath string) ([]byte, error)

ReadAll 读取文件所有内容

func SplitDirAndFileName

func SplitDirAndFileName(filePath string) (dir, file string)

SplitDirAndFileName 将目录与文件名分开

Types

This section is empty.

Jump to

Keyboard shortcuts

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