file

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPermission

func CheckPermission(src string) bool

检查文件权限

func ExistDir

func ExistDir(path string) (bool, error)

判断目录是否存在

func Exists

func Exists(path string) bool

判断所给路径文件/文件夹是否存在

func GetExt

func GetExt(fileName string) string

获取文件后缀

func GetSize

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

获取文件大小

func IsDir

func IsDir(path string) bool

判断所给路径是否为文件夹

func IsFile

func IsFile(path string) bool

判断所给路径是否为文件

func IsNotExistMkDir

func IsNotExistMkDir(src string) error

如果不存在则新建文件夹

func MkDir

func MkDir(src string) 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