fs

package
v0.0.0-...-04a33bb Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFileOrFolder

func CopyFileOrFolder(src, dst string) error

func CreateDir

func CreateDir(dirpath string) error

func CreateFile

func CreateFile(fp string) (file *os.File, err error)

func EachPath

func EachPath(path string, cb func(string) bool) error

func FileOrFolderExists

func FileOrFolderExists(path string) (exists bool, isFolder bool)

func FilterPath

func FilterPath(path, expr string) (list []string, err error)

func GetFileMD5

func GetFileMD5(path string) (string, error)

func MoveFileOrFolder

func MoveFileOrFolder(src, dst string) error

func OpenFile

func OpenFile(filepath string, readOnly bool) (file *os.File, err error)

func ReadFileAllBytes

func ReadFileAllBytes(filepath string) ([]byte, error)

func ReadFileAllLines

func ReadFileAllLines(filepath string) (lines []string, err error)

func ReadFileAllString

func ReadFileAllString(filepath string) (string, error)

func SplitFileName

func SplitFileName(p string) (dir, name, ext, namewithoutext string)

func WriteAllBytesToFile

func WriteAllBytesToFile(fp string, data []byte) (err error)

func WriteAllLinesToFile

func WriteAllLinesToFile(fp string, lines []string) (err error)

func WriteAllStringToFile

func WriteAllStringToFile(fp, str string) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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