file

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncFileReadWriter

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

func NewSynchronisedFileReadWriter

func NewSynchronisedFileReadWriter(filepath string, flags int) (SyncFileReadWriter, error)

NewSynchronisedFileReadWriter create a new SyncFileReadWriter. Do not pass os.O_APPEND as a flag, it is not required.

func (*SyncFileReadWriter) Close

func (rw *SyncFileReadWriter) Close() error

io.Closer

func (*SyncFileReadWriter) Read

func (rw *SyncFileReadWriter) Read(b []byte) (int, error)

io.Reader

func (*SyncFileReadWriter) Write

func (rw *SyncFileReadWriter) Write(b []byte) (int, error)

io.Writer Moves the file pointer to the end, performs the read, then returns it back to its prior position ready to Read

Jump to

Keyboard shortcuts

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