file

package
v0.0.0-...-1908571 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileContentType

func GetFileContentType(filename string) string

获取文件类型

func GetFileHash

func GetFileHash(file *os.File) string

计算文件哈希值

func GetFileSize

func GetFileSize(path string) float64

读取文件大小

func IsDir

func IsDir(path string) bool

判断是否是文件夹

func IsResize

func IsResize(file *os.File, quality string) bool

图片是否被压缩过

func RangeDir

func RangeDir(path string, fileList *[]string)

遍历目录下的所有文件,包含子目录

func ResizeJpg

func ResizeJpg(path string, quality int)

压缩jpg

func ResizePng

func ResizePng(path string, quality int, filename string)

压缩png

func WriteHash

func WriteHash(path string, quality string) error

写入hash

Types

This section is empty.

Jump to

Keyboard shortcuts

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