filehelper

package
v1.0.0-RC Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: AGPL-3.0 Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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