io_

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2019 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DynamicReadSeeker added in v1.0.12

func DynamicReadSeeker(getter func(off int64) (io.Reader, error), size int64) io.ReadSeeker

DynamicReadSeeker returns a ReadSeeker that reads from r got by getter at an offset. The underlying implementation is a *dynamicReadSeeker.

func LimitReadSeeker added in v1.0.10

func LimitReadSeeker(r io.ReadSeeker, n int64) io.ReadSeeker

LimitReader returns a Reader that reads from r but stops with EOF after n bytes. The underlying implementation is a *LimitedReader.

Types

type LimitedReadSeeker added in v1.0.10

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

A LimitSeekable reads from R but limits the size of the file N bytes. Read returns EOF when N <= 0 or when the underlying R returns EOF.

func (*LimitedReadSeeker) Read added in v1.0.10

func (l *LimitedReadSeeker) Read(p []byte) (n int, err error)

func (*LimitedReadSeeker) Seek added in v1.0.10

func (l *LimitedReadSeeker) Seek(offset int64, whence int) (int64, error)

type Stater added in v1.0.9

type Stater interface {
	Stat() (os.FileInfo, error)
}

Stater is the interface that wraps the basic Stat method. Stat returns the FileInfo structure describing file.

type WriterFunc

type WriterFunc func(p []byte) (n int, err error)

func (WriterFunc) Write

func (f WriterFunc) Write(p []byte) (n int, err error)

type WriterFuncPrintfLike

type WriterFuncPrintfLike func(format string, args ...interface{})

func (WriterFuncPrintfLike) Write

func (f WriterFuncPrintfLike) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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