ioutil

package
v0.52.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProgressReadSeeker added in v0.45.0

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

ProgressReadSeeker wraps an io.ReadSeeker and tracks read progress

func NewProgressReader added in v0.45.0

func NewProgressReader(rs io.ReadSeeker, total int64, onProgress func(read int64, total int64)) *ProgressReadSeeker

NewProgressReader creates a new ProgressReader

func (*ProgressReadSeeker) BytesRead added in v0.45.0

func (pr *ProgressReadSeeker) BytesRead() int64

Read returns the number of bytes read so far

func (*ProgressReadSeeker) Progress added in v0.45.0

func (pr *ProgressReadSeeker) Progress() float64

Progress returns the current progress as a float64 between 0 and 1

func (*ProgressReadSeeker) Read added in v0.45.0

func (pr *ProgressReadSeeker) Read(p []byte) (int, error)

Read implements io.Reader

func (*ProgressReadSeeker) Seek added in v0.45.0

func (pr *ProgressReadSeeker) Seek(offset int64, whence int) (int64, error)

Seek implements io.ReadSeeker.

func (*ProgressReadSeeker) Total added in v0.45.0

func (pr *ProgressReadSeeker) Total() int64

Total returns the total number of bytes

type ProgressWriter

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

func NewProgressWriter

func NewProgressWriter(
	wr io.Writer,
	onWrite func(n int),
) *ProgressWriter

func (*ProgressWriter) Write

func (p *ProgressWriter) Write(buf []byte) (n int, err error)

type ProgressWriterAt

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

func NewProgressWriterAt

func NewProgressWriterAt(
	wrAt io.WriterAt,
	onWrite func(n int),
) *ProgressWriterAt

func (*ProgressWriterAt) WriteAt

func (p *ProgressWriterAt) WriteAt(buf []byte, off int64) (n int, err error)

Jump to

Keyboard shortcuts

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