filehelper

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIFileUrlRetriever added in v1.1.0

func APIFileUrlRetriever(fileUrl string) string

func Abs2Rel

func Abs2Rel(path string) string

func Append

func Append(filename, content string) error

Append append content to file. Create file if not exists.

func CheckExist

func CheckExist(path string, needDir bool) error

CheckExist please check error is nil or not

func Copy

func Copy(src, dst string) error

func CreateFile

func CreateFile(absPath, content string, perm os.FileMode) error

CreateFile create file if not exist, or truncate file and then write content to file.

func CreateFile2

func CreateFile2(absPath string, r io.Reader, perm os.FileMode) error

func CreateFile3

func CreateFile3(absPath string, r io.Reader, perm os.FileMode) (*os.File, error)

CreateFile3 return the created file and error if have

func FilterAPIFileUrl added in v1.1.0

func FilterAPIFileUrl(content string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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