util

package
v0.0.0-...-8375e82 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

gmfs util

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteMD5

func ByteMD5(data []byte) string

*

  • Byte MD5

func FileHashMD5

func FileHashMD5(path string) (string, error)

*

  • File MD5

func FileSuffix

func FileSuffix(fileName string) string

*

  • 获取文件后缀,例如 .exe

func GenerateRandomFilename

func GenerateRandomFilename(dot bool, extension string) string

*

  • 生成随机文件名, extension 文件扩展名
  • GenerateRandomFilename("jpg")

func IsImage

func IsImage(filetype string) bool

*

func Mkdir

func Mkdir(filePath string) bool

*

  • 递归创建目录

func PathExist

func PathExist(filePath string) bool

*

  • 检查文件是否存在

func ReaderHashMD5

func ReaderHashMD5(r io.Reader) (string, error)

*

  • Reader MD5

Types

This section is empty.

Jump to

Keyboard shortcuts

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