ar

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrefixSymdef = "__.SYMDEF"
)

Variables

View Source
var (
	MagicHeader      = []byte("!<arch>\n")
	ErrInvalidFormat = errors.New("not ar file format")
)

Functions

func TrimTailSpace

func TrimTailSpace(b []byte) string

Types

type File

type File struct {
	*io.SectionReader
	Header
}

func NewArchive

func NewArchive(ra io.ReaderAt) ([]*File, error)

NewArchive is a wrapper

type Header struct {
	Name    string
	Size    int64
	ModTime time.Time
	UID     int
	GID     int
	Mode    fs.FileMode
	// contains filtered or unexported fields
}

https://en.wikipedia.org/wiki/Ar_(Unix)

type Reader

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

func NewReader

func NewReader(r io.ReaderAt) (*Reader, error)

func (*Reader) Next

func (r *Reader) Next() (*File, error)

Next returns a file header and a reader of original data

Jump to

Keyboard shortcuts

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