fileUtils

package
v0.0.0-...-a97389e Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsolutePath

func AbsolutePath(pth string) string

func AddFilePathSepIfNeeded

func AddFilePathSepIfNeeded(pth string) string

func AddSepIfNeeded

func AddSepIfNeeded(pth string) string

func AddUrlPathSepIfNeeded

func AddUrlPathSepIfNeeded(url string) string

func CopyDir

func CopyDir(src, dest string) (err error)

func CopyFile

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

func CopyFileAll

func CopyFileAll(src, dst string) (nBytes int64, err error)

func Download

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

func FileExist

func FileExist(path string) bool

func GetAbsolutePath

func GetAbsolutePath(pth string) string

func GetDirName

func GetDirName(pth string) (name string)

func GetExtName

func GetExtName(pathOrUrl string) string

func GetExtNameWithoutDot

func GetExtNameWithoutDot(pathOrUrl string) string

func GetFileName

func GetFileName(pathOrUrl string) string

func GetFileNameBySep

func GetFileNameBySep(path string, pthSep string) string

func GetFileNameWithoutExt

func GetFileNameWithoutExt(pathOrUrl string) string

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 GetZTFDir

func GetZTFDir() (dir string)

func GetZTFHome

func GetZTFHome() string

func HTTPDownload

func HTTPDownload(uri string) ([]byte, error)

func IsAbsolutePath

func IsAbsolutePath(pth string) bool

func IsDir

func IsDir(f string) bool

func IsFile

func IsFile(path string) bool

func Md5

func Md5(path string) string

func MkDirIfNeeded

func MkDirIfNeeded(dir string) error

func ReadFile

func ReadFile(filePath string) string

func ReadFileBuf

func ReadFileBuf(filePath string) []byte

func RemoveFilePathSepIfNeeded

func RemoveFilePathSepIfNeeded(pth string) string

func RmDir

func RmDir(dir string) error

func Unzip

func Unzip(zipPath, dstDir string) error

func Upload

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

func UploadWithResp

func UploadWithResp(url string, files []string, extraParams map[string]string) map[string]interface{}

func WriteDownloadFile

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

func WriteFile

func WriteFile(filePath string, content string)

func ZipDir

func ZipDir(dist string, dir string) error

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