squashfs

package
v0.0.0-...-48d87d0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2015 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlobPath

func BlobPath(instDir string) string

BlobPath is a helper that calculates the blob path from the baseDir. FIXME: feels wrong (both location and approach). need something better.

Types

type Snap

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

Snap is the squashfs based snap.

func New

func New(path string) *Snap

New returns a new Squashfs snap.

func (*Snap) Build

func (s *Snap) Build(buildDir string) error

Build builds the snap.

func (*Snap) Close

func (s *Snap) Close() error

Close is not doing anything for squashfs - COMPAT

func (*Snap) ControlMember

func (s *Snap) ControlMember(controlMember string) ([]byte, error)

ControlMember extracts from meta/ - COMPAT

func (*Snap) ExtractHashes

func (s *Snap) ExtractHashes(dir string) error

ExtractHashes does notthing for squashfs snaps. - COMAPT

func (*Snap) HashDigest

func (s *Snap) HashDigest(hash crypto.Hash) (uint64, []byte, error)

HashDigest computes a hash digest of the snap file using the given hash. It also returns its size.

func (*Snap) MetaMember

func (s *Snap) MetaMember(metaMember string) ([]byte, error)

MetaMember extracts from meta/. - COMPAT

func (*Snap) Name

func (s *Snap) Name() string

Name returns the Name of the backing file.

func (*Snap) NeedsMountUnit

func (s *Snap) NeedsMountUnit() bool

NeedsMountUnit returns true because a squashfs snap neesd to be monted, it will not be usable otherwise

func (*Snap) ReadFile

func (s *Snap) ReadFile(path string) (content []byte, err error)

ReadFile returns the content of a single file inside a squashfs snap.

func (*Snap) Unpack

func (s *Snap) Unpack(src, dstDir string) error

Unpack unpacks the src (which may be a glob) into the given target dir.

func (*Snap) UnpackWithDropPrivs

func (s *Snap) UnpackWithDropPrivs(instDir, rootdir string) error

UnpackWithDropPrivs just copies the blob into place. - COMPAT

func (*Snap) Verify

func (s *Snap) Verify(unauthOk bool) error

Verify verifies the snap.

Jump to

Keyboard shortcuts

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