file

package
v0.0.0-...-e081c89 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFile

func NewFile(name string) (_ stdio.Io, err error)

NewFile writer stream.Io pipe

Types

type File

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

File Io interface

func (*File) Close

func (f *File) Close()

Close file writer

func (*File) DefaultDataType

func (f *File) DefaultDataType(bool)

DefaultDataType is an empty method because file devices are write only

func (*File) File

func (f *File) File() *os.File

func (*File) ForceClose

func (f *File) ForceClose()

ForceClose forces the stream.Io interface to close.

func (*File) GetDataType

func (f *File) GetDataType() string

GetDataType is an empty method because file devices are write only

func (*File) IsTTY

func (f *File) IsTTY() bool

IsTTY returns false because the file writer is not a pseudo-TTY

func (*File) Open

func (f *File) Open()

Open file writer

func (*File) Read

func (f *File) Read([]byte) (int, error)

Read is an empty method because file devices are write only

func (*File) ReadAll

func (f *File) ReadAll() ([]byte, error)

ReadAll is an empty method because file devices are write only

func (*File) ReadArray

func (f *File) ReadArray(context.Context, func([]byte)) error

ReadArray is an empty method because file devices are write only

func (*File) ReadArrayWithType

func (f *File) ReadArrayWithType(context.Context, func(interface{}, string)) error

ReadArrayWithType is an empty method because file devices are write only

func (*File) ReadLine

func (f *File) ReadLine(func([]byte)) error

ReadLine is an empty method because file devices are write only

func (*File) ReadMap

func (f *File) ReadMap(*config.Config, func(*stdio.Map)) error

ReadMap is an empty method because file devices are write only

func (*File) SetDataType

func (f *File) SetDataType(string)

SetDataType is an empty method because file devices are write only

func (*File) Stats

func (f *File) Stats() (bytesWritten, bytesRead uint64)

Stats returns bytes written and read. As File is a write-only interface bytes read will always equal 0

func (*File) Write

func (f *File) Write(b []byte) (int, error)

Write is the io.Writer interface

func (*File) WriteArray

func (f *File) WriteArray(dataType string) (stdio.ArrayWriter, error)

WriteArray performs data type specific buffered writes to an stdio.Io interface

func (*File) WriteTo

func (f *File) WriteTo(io.Writer) (int64, error)

WriteTo is an empty method because file devices are write only

func (*File) Writeln

func (f *File) Writeln(b []byte) (int, error)

Writeln is the io.Writeln interface

Jump to

Keyboard shortcuts

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