squashfs

package
v0.0.0-...-921daf7 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2016 License: GPL-3.0 Imports: 11 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) 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) Info

func (s *Snap) Info() (*snap.Info, error)

Info returns information like name, type etc about the package

func (*Snap) Install

func (s *Snap) Install(instDir string) error

Install just copies the blob into place (unless it is used in the tests)

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) 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.

Jump to

Keyboard shortcuts

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