write

package
v0.2.54 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	// contains filtered or unexported fields
}

func Open

func Open(path string) *File

Open 打开文件,文件不存在创建,文件已存在清空

func OpenAppend

func OpenAppend(path string) *File

OpenAppend 追加模式打开文件,文件不存在创建,文件已存在清空

func OpenAppendMustNotExist

func OpenAppendMustNotExist(path string) *File

OpenAppendMustNotExist 追加打开文件,文件不存在创建,文件已存在就报错

func OpenMustNotExist

func OpenMustNotExist(path string) *File

OpenMustNotExist 打开文件,文件不存在创建,文件已存在就报错

func (*File) Close

func (file *File) Close() error

func (*File) GetFile

func (file *File) GetFile() (*os.File, error)

GetFile 获取文件

func (*File) Write

func (file *File) Write(data []byte) error

数据写入

func (*File) WriteNotClose added in v0.2.30

func (file *File) WriteNotClose(data []byte) error

WriteNotClose 不关闭写入

Jump to

Keyboard shortcuts

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