_fileUtils

package
v0.0.0-...-5746ace Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsolutePath

func AbsolutePath(pth string) string

func AddPathSepIfNeeded

func AddPathSepIfNeeded(pth string) string

func AddSepIfNeeded

func AddSepIfNeeded(pth string) string

func AddTimeParam

func AddTimeParam(url string) (ret string)

func CopyFile

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

func Download

func Download(url string, dst string) (err error)

func DownloadAdv

func DownloadAdv(url, filePath string) (dur int64, err error)

func FileExist

func FileExist(path string) bool

func GetAbsolutePath

func GetAbsolutePath(pth string) string

func GetExeDir

func GetExeDir() string

func GetExtName

func GetExtName(pathOrUrl string) string

func GetFileDir

func GetFileDir(pathOrUrl string) string

func GetFileName

func GetFileName(pathOrUrl string) string

func GetFileNameWithoutExt

func GetFileNameWithoutExt(pathOrUrl string) string

func GetFileSize

func GetFileSize(pth string) (size int64, err error)

func GetFilesFromParams

func GetFilesFromParams(arguments []string) []string

func GetMd5

func GetMd5(pth string) (ret string, err error)

func GetUserHome

func GetUserHome() (dir string, err error)

func GetWorkDir

func GetWorkDir() string

func GetZipSingleDir

func GetZipSingleDir(path string) string

func HTTPDownload

func HTTPDownload(url string) (bytes []byte, err error)

func IsAbsolutePath

func IsAbsolutePath(pth string) bool

func IsDir

func IsDir(f string) bool

func MkDirIfNeeded

func MkDirIfNeeded(dir string) error

func ReadFile

func ReadFile(filePath string) string

func ReadFileBuf

func ReadFileBuf(filePath string) []byte

func RemoveFile

func RemoveFile(dir string) error

func Upload

func Upload(url string, files []string, extraParams map[string]string)

func WriteDownloadFile

func WriteDownloadFile(dst string, d []byte) (err error)

func WriteFile

func WriteFile(filePath string, content string)

func ZipFiles

func ZipFiles(dist string, dir string, files []string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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