Utils

package
v0.0.0-...-26395bb Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const MAXTITLEIMAGESIZE int64 = 30720

Variables

View Source
var Logger *log.Logger

Functions

func CopyFile

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

func CreateFile

func CreateFile(filePath string) bool

func CurrentTime

func CurrentTime() string

func CurrentUser

func CurrentUser() string

func DeleteFile

func DeleteFile(filePath string) bool

func GUID

func GUID() string

func GetImageType

func GetImageType(base64Image string) (string, error)

func GetImageWithSameName

func GetImageWithSameName(filePath string) (string, error)

func GetImageWithSameName2

func GetImageWithSameName2(folderPath, fileName string) (string, error)

func GetImageWithSameTitle

func GetImageWithSameTitle(fileFolder, fileTitle string) (string, error)

func GetMd5String

func GetMd5String(s string) string

func GetMetaFilePathWithSameName

func GetMetaFilePathWithSameName(filePath string) (string, error)

func ImageTooBig

func ImageTooBig(titleImagePath string) (bool, error)

func InitLogger

func InitLogger()

func IsGuid

func IsGuid(id string) bool

func MakeFolder

func MakeFolder(sPath string) (bool, error)

func MakePath

func MakePath(sPath string) (string, error)

func MakeSoftLink4Folder

func MakeSoftLink4Folder(srcFolder, linkFolder string) (bool, error)

func MoveFile

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

func PathIsDir

func PathIsDir(filePath string) bool

func PathIsExist

func PathIsExist(filePath string) bool

func PathIsFile

func PathIsFile(filePath string) bool

func PathIsImage

func PathIsImage(filePath string) bool

func PathIsMarkdown

func PathIsMarkdown(filePath string) bool

func ReadImageAsBase64

func ReadImageAsBase64(imagePath string) (string, error)

func SaveBase64AsImage

func SaveBase64AsImage(imageContent, targetPath string) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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