hafile

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendLine added in v0.0.19

func AppendLine(path string, content string) error

append

func CheckFile added in v0.0.10

func CheckFile(path string) bool

check if file exist

func CheckFolder added in v0.0.5

func CheckFolder(path string) bool

check folder and create if not exist

func CheckRelativePath added in v0.0.12

func CheckRelativePath(path string) bool

func Copy

func Copy(src, dst string) error

func CopyFolder

func CopyFolder(src, dst string) error

copy folder to another folder

func ExistFile added in v0.0.9

func ExistFile(path string) bool

check if file exist

func ExistFolder added in v0.0.9

func ExistFolder(path string) bool

check folder and create if not exist

func FullPath added in v0.0.12

func FullPath(path string) (string, error)

get current relative path's full path

func OpenFile added in v0.0.5

func OpenFile(path string) *os.File

func WriteLine added in v0.0.11

func WriteLine(path string, line int, content string) error

write to specific line

Types

type FileWriter added in v0.0.17

type FileWriter struct {
	Path string
}

func NewFileWriter added in v0.0.17

func NewFileWriter(path string) *FileWriter

func (*FileWriter) Write added in v0.0.17

func (writer *FileWriter) Write(text string) error

type Yml added in v0.0.22

type Yml struct {
	*YmlReader
	*YmlWriter
}

func NewYml added in v0.0.22

func NewYml(path string) *Yml

type YmlReader added in v0.0.5

type YmlReader struct {
	Path string
}

func NewYmlReader added in v0.0.5

func NewYmlReader(path string) *YmlReader

func (*YmlReader) Parser added in v0.0.5

func (reader *YmlReader) Parser(data interface{}) error

type YmlWriter added in v0.0.5

type YmlWriter struct {
	Path string
}

func NewYmlWriter added in v0.0.5

func NewYmlWriter(path string) *YmlWriter

func (*YmlWriter) Append added in v0.0.5

func (writer *YmlWriter) Append(data interface{}) error

func (*YmlWriter) Write added in v0.0.5

func (writer *YmlWriter) Write(data interface{}) error

Jump to

Keyboard shortcuts

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