write

package
v0.2.35 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: Apache-2.0 Imports: 1 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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