fs

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(srcFile, dstFile string) error

func CopyDir

func CopyDir(scrDir, dest string) error
func CopySymLink(source, dest string) error

func CreateIfNotExists

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

func GetFilePerm

func GetFilePerm(path string) (string, error)

func IsExist

func IsExist(path string) bool

func Mkdir

func Mkdir(path string) error

Mkdir is wrapper for os.MkdirAll

func Move

func Move(src, dst string) error

Move is wrapper for os.Rename

func MustOpen

func MustOpen(path string) (*os.File, error)

MustOpen if the file does not exist, create a file and open it in overwrite mode

func MustOpenWithAppend

func MustOpenWithAppend(path string) (*os.File, error)

func MustOpenWithFlag

func MustOpenWithFlag(path string, flag int) (*os.File, error)

func Open

func Open(path string) (*os.File, error)

Open is a wrapper for os.Open

func ReadAsBytes

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

func Remove

func Remove(path string) error

Remove is wrapper for os.Remove

func WriteAsBytes

func WriteAsBytes(path string, b []byte) error

WriteAsBytes will overwrite the target file

Types

This section is empty.

Jump to

Keyboard shortcuts

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