ar

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const HEAD_SIZE int = 60

HEAD_SIZE default size for meta data of contained files

Variables

View Source
var (
	ErrTooLongValue      = errors.New("too long value")
	ErrUnsupportedValue  = errors.New("unsupported value")
	ErrInvalidParseValue = errors.New("parsing error")
	ErrInvalidFileFormat = errors.New("invalid file format")
	ErrFileNotFound      = errors.New("file not found")
	ErrFileExist         = errors.New("file already exist")
)

Functions

This section is empty.

Types

type Arch

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

func Open

func Open(filename string, perm os.FileMode) (*Arch, error)

func (*Arch) Close

func (v *Arch) Close() error

func (*Arch) Export

func (v *Arch) Export(filename, dir string) error

func (*Arch) Import

func (v *Arch) Import(filename string, perm fs.FileMode) error

func (*Arch) List

func (v *Arch) List() []Header

func (*Arch) Read

func (v *Arch) Read(filename string, w io.Writer) error

func (*Arch) Write

func (v *Arch) Write(filename string, b []byte, perm fs.FileMode) error
type Header struct {
	FileName  string
	Timestamp int64
	Mode      int64
	Size      int64
}

Header meta data of contained files

func (*Header) Bytes

func (v *Header) Bytes() ([]byte, error)

Bytes make string from Header model

func (*Header) Parse

func (v *Header) Parse(b []byte) error

Parse decode string to Header model

Jump to

Keyboard shortcuts

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