file

package
v2.1.41 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApiRoot string

ApiRoot 当前项目根目录

Functions

func CheckDir

func CheckDir(path string) bool

CheckDir 判断文件目录否存在

func CheckFile

func CheckFile(filename string) bool

CheckFile 判断文件是否存在 存在返回 true 不存在返回false

func GetFileSize

func GetFileSize(filePath string) (int64, error)

GetFileSize 获取文件大小

func GetPath

func GetPath() string

GetPath 获取项目路径

func MkdirDir

func MkdirDir(path string) error

MkdirDir 创建文件夹,支持x/a/a 多层级

func RemoveDir

func RemoveDir(filePath string) error

RemoveDir 删除文件

func Unzip

func Unzip(zipFile, destDir string) error

Unzip 文件解压

func UploadFile

func UploadFile(file *multipart.FileHeader, path string) (string, error)

UploadFile 创建文件并生产目录

func Zip

func Zip(srcFile string, destZip string) error

Zip 文件压缩

Types

This section is empty.

Jump to

Keyboard shortcuts

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