wutils

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 8 Imported by: 0

README

wutils

golang tools

Documentation

Index

Constants

View Source
const (
	DefaultFileMode     = 0766
	CopyWhenUnsupported = 1
)
View Source
const CopyFileBuffSize = 1024

Variables

This section is empty.

Functions

func CompressImage added in v1.0.1

func CompressImage(sourcePath string, targetPath string, format string, quality int) error

func CompressImageExt added in v1.0.1

func CompressImageExt(sourcePath string, targetPath string, format string, quality int, perm os.FileMode, unsupported int) error

func CopyFile added in v1.0.1

func CopyFile(src string, dst string) (int64, error)

CopyFile 复制文件

func CreateFolderIfNotExists

func CreateFolderIfNotExists(filePath string, perm os.FileMode)

CreateFolderIfNotExists 创建临时文件路径,如果他不存在的话

func FileExists

func FileExists(path string) bool

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

func IsDir

func IsDir(path string) bool

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

func NotDir

func NotDir(path string) bool

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

func SupportFormat added in v1.0.1

func SupportFormat(format string) bool

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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