fileutil

package
v0.70.5 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RewindableReader

type RewindableReader interface {
	io.ReadSeeker
	// Rewind allows sets ResetableReader to start re-reading the same data.
	Rewind() error
	// Name() returns a user-visible name for underlying storage.  It may help debug some
	// issues.
	Name() string
}

RewindableReader allows repeatedly reading the same stream.

type WriterThenReader

type WriterThenReader interface {
	io.Writer
	// StartReading stops writing and returns a ResetableReader that will allow repeatedly
	// reading the data and the total length of data.  The WriterThenReader should be
	// discarded; calls to Write() after StartReading() will fail.
	StartReading() (RewindableReader, int64, error)
	// Name() returns a user-visible name for underlying storage.  It may help debug some
	// issues.
	Name() string
}

WriterThenReader writes data to storage, then allows reading it. It is suitable for repeatedly processing large volumes of data.

func NewFileWriterThenReader

func NewFileWriterThenReader(basename string) (WriterThenReader, error)

Jump to

Keyboard shortcuts

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