_fileUtils

package
v0.0.0-...-77e6e3b Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsolutePath

func AbsolutePath(pth string) string

func AddSepIfNeeded

func AddSepIfNeeded(pth string) string

func CopyFile

func CopyFile(src, dst string) (int64, 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 GetExeDir

func GetExeDir(workDir string) string

func GetExtName

func GetExtName(pathOrUrl string) string

func GetFileName

func GetFileName(pathOrUrl string) string

func GetFileNameWithoutExt

func GetFileNameWithoutExt(pathOrUrl string) string

func GetFilesFromParams

func GetFilesFromParams(arguments []string) []string

func GetUploadFileName

func GetUploadFileName(name 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(uri string) ([]byte, error)

func IsAbsolutePath

func IsAbsolutePath(pth string) bool

func IsDir

func IsDir(f string) bool

func ListDir

func ListDir(pth string) (ret []string, err error)

func MkDirIfNeeded

func MkDirIfNeeded(dir string) error

func ReadFile

func ReadFile(filePath string) string

func ReadFileBuf

func ReadFileBuf(filePath string) []byte

func RmDir

func RmDir(dir string) error

func Upload

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

func WriteDownloadFile

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

func WriteFile

func WriteFile(filePath string, content string) (err 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