Documentation ¶
Index ¶
- Constants
- func CompressImage(sourcePath string, targetPath string, format string, quality int) error
- func CompressImageExt(sourcePath string, targetPath string, format string, quality int, ...) error
- func CopyFile(src string, dst string) (int64, error)
- func CopyFileWithBuff(srcFile *os.File, dstFile *os.File, bufSize int) (int64, error)
- func CreateFolderIfNotExists(filePath string, perm os.FileMode)
- func FileExists(path string) bool
- func IsDir(path string) bool
- func NotDir(path string) bool
- func SupportFormat(format string) bool
Constants ¶
View Source
const ( DefaultFileMode = 0766 CopyWhenUnsupported = 1 )
View Source
const CopyFileBuffSize = 1024 * 4
CopyFileBuffSize 复制用的buff大小 4k
Variables ¶
This section is empty.
Functions ¶
func CompressImage ¶ added in v1.0.1
CompressImage 压缩图片
func CompressImageExt ¶ added in v1.0.1
func CompressImageExt(sourcePath string, targetPath string, format string, quality int, perm os.FileMode, unsupported int) error
CompressImageExt 压缩图片的扩展方法
func CopyFileWithBuff ¶ added in v1.0.2
CopyFileWithBuff 使用buff讲一个打开的文件复制到另一个打开的文件
func CreateFolderIfNotExists ¶
CreateFolderIfNotExists 创建临时文件路径,如果他不存在的话
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.