file

package
v0.0.0-...-4caec29 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckErrPermission

func CheckErrPermission(src string) bool

检查文件目录的访问权限,没有权限则返回true

func CheckNotExist

func CheckNotExist(src string) bool

文件不存在返回true

func GetExt

func GetExt(fileName string) string

获取文件扩展名

func GetSize

func GetSize(f multipart.File) (int, error)

获取文件大小

func IsNotExistMkDir

func IsNotExistMkDir(src string) error

文件不存在则创建

func MkDir

func MkDir(src string) error

创建目录,权限为0777

func MustOpen

func MustOpen(fileName, filePath string) (*os.File, error)

打开文件,没有则创建再打开,返回文件指针

func Open

func Open(name string, flag int, perm os.FileMode) (*os.File, error)

打开文件,返回文件指针

Types

This section is empty.

Jump to

Keyboard shortcuts

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