tarfsdatasource

package
v0.16.0-dev Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDataSource

func NewDataSource(r io.Reader, decompress func(reader io.Reader) (io.Reader, error)) (tarpatch.DataSource, error)

NewDataSource constructs a tarpatch.DataSource that optionally decompresses the input archive and writes the archive to a temporary file. Calling Close() cleans up the temporary files.

Types

type DataSource

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

DataSource implements a file system backed tarpatch.DataSource. This does not extract the archive, but it creates a temporary file, to which the contents are written lazily.

func (*DataSource) Close

func (t *DataSource) Close() error

func (*DataSource) CloseDataSource

func (t *DataSource) CloseDataSource() error

CloseDataSource Close the currently opened reader.

func (*DataSource) Read

func (t *DataSource) Read(p []byte) (n int, err error)

func (*DataSource) Seek

func (t *DataSource) Seek(offset int64, whence int) (int64, error)

func (*DataSource) SetCurrentFile

func (t *DataSource) SetCurrentFile(file string) error

Jump to

Keyboard shortcuts

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