easyio

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadFile

func ReadFile(data string) (string, error)

ReadFile 从文件读取文本

func TouchFile

func TouchFile(destPath string, clear bool) error

TouchFile 创建文件 destPath 文件路径 clear 若文件已存在是否清空

func WriteFile

func WriteFile(data string, dest string, append bool) error

WriteFile 写入文本到文件

Types

type CallbackWriter

type CallbackWriter struct {
	Callback func(p []byte)
}

CallbackWriter io.Writer实例 通过Callback方式读取写入的值

func (*CallbackWriter) Write

func (w *CallbackWriter) Write(data []byte) (n int, err error)

Write 实现io.Writer接口

Jump to

Keyboard shortcuts

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