iof

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exist

func Exist(filename string) bool

检查文件或目录是否存在 如果由 filename 指定的文件或目录存在则返回 true,否则返回 false

func FileToBase64String

func FileToBase64String(path string) string

文件base64序列化

func FilepathToBase64String added in v0.0.6

func FilepathToBase64String(filepath string) string

文件转base64

func GetFileModTime added in v0.0.6

func GetFileModTime(path string) int64

获取文件修改时间 返回unix时间戳

func PathExists added in v0.0.6

func PathExists(path string) (bool, error)

该路径是否存在

func Read

func Read(file_path string) string

read by the file path

func ReadFileListFromDir added in v0.0.6

func ReadFileListFromDir(path string) ([]fs.FileInfo, int)

读取文件夹下所有文件

func ReadLine

func ReadLine(fileName string, handler func(string)) error

read file by line and handler func to do it.

func ReadUrl

func ReadUrl(file_url string) string

read the file by the url

func WriteToBinaryFile

func WriteToBinaryFile(filename string, body io.Reader) int64

func WriteToFile

func WriteToFile(body, path string) bool

func WriteUrlToFile

func WriteUrlToFile(url, path string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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