fileutil

package
v0.0.0-...-217ce7f Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangePermission

func ChangePermission(filePath string, perm os.FileMode) error

func Copy

func Copy(src, dst string) error

Copy copies a src file to a dst file where src and dst are regular files.

func CopyDirectory

func CopyDirectory(src, dst string) error

CopyDirectory recursively copies a src directory to a destination.

func CopySymLink(source, dest string) error

CopySymLink copies src symLink to dst symLink

func CreateIfNotExists

func CreateIfNotExists(dir string, perm os.FileMode) error

CreateIfNotExists creates dir if not exists

func Exists

func Exists(filePath string) bool

Exists check if file exists

func ReadFile

func ReadFile(path string) ([]byte, error)

ReadFile wrapper for ioutil.ReadFile

func RemoveFile

func RemoveFile(path string) error

RemoveFile wrapper for os.Remove

func Unzip

func Unzip(src string, dest string) error

Unzip wrapper for archive.zip

func WriteFile

func WriteFile(path string, content []byte) error

WriteFile wrapper for ioutil.WriteFile

Types

This section is empty.

Jump to

Keyboard shortcuts

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