file

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileCreate

func FileCreate(content bytes.Buffer, name string) error

func FileDelete

func FileDelete(filePath string) error

FileDelete removes the named file.

func FileIsExists

func FileIsExists(fp string) bool

func FileName

func FileName(filePath string) (name string, extension string)

func FileSize

func FileSize(filePath string, fmt byte, bit int) (float64, error)

FileSize 获取文件大小

func GetExt

func GetExt(fileName string) string

GetExt returns the extension of a given file name.

func GetFileSize

func GetFileSize(filename string) int64

获取文件大小

func IsDirExist

func IsDirExist(addr string) bool

IsDirExist 判断目录是否存在

func Mkdir

func Mkdir(dirPath string) error

Mkdir create a specific dir

func MkdirWithModePerm

func MkdirWithModePerm(dirPath string, mode os.FileMode) (err error)

func PathCreate

func PathCreate(dir string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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