utils

package
v0.0.0-...-b63cf6a Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AllOfficeEtx  = []string{".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx"}
	AllImageEtx   = []string{".jpeg", ".jpg", ".png", ".gif", ".bmp", ".heic", ".tiff"}
	AllCADEtx     = []string{".dwg", ".dxf"}
	AllAchieveEtx = []string{".tar.gz", ".tar.bzip2", ".tar.xz", ".zip", ".rar", ".tar", ".7z", "br", ".bz2", ".lz4", ".sz", ".xz", ".zstd"}
	AllTxtEtx     = []string{".txt", ".java", ".php", ".py", ".md", ".js", ".css", ".xml", ".log"}
	AllVideoEtx   = []string{".mp4", ".webm", ".ogg"}
)

Functions

func ConvertFromCADToPDF

func ConvertFromCADToPDF(filePath string) string

func ConvertToPDF

func ConvertToPDF(filePath string) string

func DownloadFile

func DownloadFile(source string, fileSuffix string, filenameWithSuffix string) (string, error)

func File2Bytes

func File2Bytes(filename string) ([]byte, error)

func FileExist

func FileExist(path string) bool

func FileTypeVerify

func FileTypeVerify(url string) (string, string, string)

func GetFileNameOnly

func GetFileNameOnly(url string) string

func GetFilesFromDirectory

func GetFilesFromDirectory(source string) ([]string, string)

func InteractiveToexec

func InteractiveToexec(commandName string, params []string) (string, bool)

func IsFileExist

func IsFileExist(filename string, filesize int64) bool

func PathExists

func PathExists(path string) (bool, error)

func UnarchiveFiles

func UnarchiveFiles(file string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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