cpio

package
v0.0.0-...-759cef8 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHeader  = errors.New("cpio: invalid header")
	ErrArchive = errors.New("cpio: invalid archive")
)
View Source
var (
	ErrTooLarge = errors.New("cpio: file too large")
)

Functions

This section is empty.

Types

type Header struct {
	Name  string
	UID   string
	GID   string
	Size  int64
	Mtime time.Time
}

type Reader

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

func NewReader

func NewReader(r io.Reader) *Reader

func (*Reader) Next

func (cr *Reader) Next() (*Header, error)

func (*Reader) Read

func (cr *Reader) Read(b []byte) (int, error)

type Writer

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

func NewWriter

func NewWriter(w io.Writer) *Writer

func (*Writer) Close

func (cw *Writer) Close() error

func (*Writer) Write

func (cw *Writer) Write(b []byte) (int, error)

func (*Writer) WriteHeader

func (cw *Writer) WriteHeader(hdr *Header) error

Jump to

Keyboard shortcuts

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