fileUtils

package
v0.0.0-...-b92f783 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFilePostfix

func AddFilePostfix(pth, postfix string) (ret string)

func AddPathSepRightIfNeeded

func AddPathSepRightIfNeeded(pth string) string

func AddSepIfNeeded

func AddSepIfNeeded(pth string) string

func ChangeFileExt

func ChangeFileExt(filePath, ext string) string

func ConvertReferRangeToPath

func ConvertReferRangeToPath(file, currFile string) (path string)

func ConvertResExcelPath

func ConvertResExcelPath(from, dir string) (ret, sheet string)

func ConvertResYamlPath

func ConvertResYamlPath(from, workDir string) (ret string)

func Download

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

func FileExist

func FileExist(path string) bool

func GetAbsDir

func GetAbsDir(path string) string

func GetAbsoluteDir

func GetAbsoluteDir(pth string) string

func GetAbsolutePath

func GetAbsolutePath(pth string) string

func GetFileName

func GetFileName(filePath string) string

func GetFileOrFolderDir

func GetFileOrFolderDir(pth string) (ret string)

func GetFilesByExtInDir

func GetFilesByExtInDir(folder, ext string, files *[]string)

func GetFilesFromParams

func GetFilesFromParams(args []string) (files []string, count int)

func GetFilesInDir

func GetFilesInDir(folder, ext string, files *[]string)

func GetResProp

func GetResProp(from, currFileDir string) (resFile, resType, sheet string)

func GetUploadFileName

func GetUploadFileName(name string) (ret string, err error)

func GetWorkDir

func GetWorkDir(root string) (ret string, err error)

func HTTPDownload

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

func HandleFiles

func HandleFiles(files []string) []string

func IsAbsPath

func IsAbsPath(pth string) bool

func IsDir

func IsDir(f string) bool

func MkDirIfNeeded

func MkDirIfNeeded(dir string) error

func NewFileNameWithUlidPostfix

func NewFileNameWithUlidPostfix(pth string) (ret string)

func ReadFile

func ReadFile(filePath string) string

func ReadFileBuf

func ReadFileBuf(filePath string) []byte

func RemoveExist

func RemoveExist(path string)

func RemovePathSepLeftIfNeeded

func RemovePathSepLeftIfNeeded(pth string) string

func RmFile

func RmFile(dir string) error

func WriteDownloadFile

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

func WriteFile

func WriteFile(filePath string, content string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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