file

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

error debug

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cpfile

func Cpfile(originalFilePath, newFilePath string) error

Copy a file

func CreatePath

func CreatePath(path string) error

* * 创建目录

func DownProgress

func DownProgress(url string, localPath string, fb func(length, downLen int64)) error

* * 文件下载 * param url 要下载的文件URL * param localPath 文件保存路径(或文件保存名称) * fb 回调下载进度

func DownloadFile

func DownloadFile(url, filename string) error

* * 文件下载 * param url 要下载的文件URL * param filename 文件保存路径(或文件保存名称)

func FileExists

func FileExists(path string) (bool, error)

* * 文件是否存在

func GetFileContent

func GetFileContent(FilePath string) string

*

*读取文件内容(返回字符串)

func GetParentDirectory

func GetParentDirectory(dirctory, SEPARATOR string) string

func Geturl

func Geturl(url string) ([]byte, error)

*

  • 获取远程接口信息

func IsFileExist

func IsFileExist(filename string, filesize int64) (bool, error)

* * 文件是否存在

func ReadFile

func ReadFile(path string) string

* * read file

func Substr

func Substr(s string, pos, length int) string

func WriteFile

func WriteFile(filePath, data 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