file

package
v1.7.18 Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(path string) bool

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

Types

type File

type File struct {
	// file name
	Name string
	// path
	Path    string
	NewPath string
	// img attributes
	Width  int
	Height int
}

file

func (*File) CompressImage

func (f *File) CompressImage(imageType string) error

图片压缩

func (*File) GetUploadFile

func (f *File) GetUploadFile(file *multipart.FileHeader) (filename string, err error)

获得文件上传路径

func (*File) SaveUploadedFile

func (f *File) SaveUploadedFile(file *multipart.FileHeader, filename string) (path string, err error)

save file

Jump to

Keyboard shortcuts

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