tar2go

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDelete should be returned by an UpdaterFn when the file should be deleted.
	ErrDelete = errors.New("delete")
)

Functions

This section is empty.

Types

type Index

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

func NewIndex

func NewIndex(rdr io.ReaderAt) *Index

func (*Index) FS

func (i *Index) FS() fs.FS

func (*Index) Reader

func (i *Index) Reader() *io.SectionReader

func (*Index) Update

func (i *Index) Update(w io.Writer, updater UpdaterFn) error

Update creates a new tar with the files updated by the passed in updater function. The output tar is written to the passed in io.Writer

type ReaderAtSized

type ReaderAtSized interface {
	io.ReaderAt
	Size() int64
}

type UpdaterFn

type UpdaterFn func(string, ReaderAtSized) (ReaderAtSized, bool, error)

Jump to

Keyboard shortcuts

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