squashfs

package
v0.0.0-...-7cedb2b Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2016 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Magic = []byte{'h', 's', 'q', 's'}

Magic is the magic prefix of squashfs snap files.

Functions

This section is empty.

Types

type Snap

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

Snap is the squashfs based snap.

func New

func New(snapPath 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) Install

func (s *Snap) Install(targetPath, mountDir string) error

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

func (*Snap) ListDir

func (s *Snap) ListDir(dirPath string) ([]string, error)

ListDir returns the content of a single directory inside a squashfs snap.

func (*Snap) Path

func (s *Snap) Path() string

Path returns the path of the backing file.

func (*Snap) ReadFile

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

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

Jump to

Keyboard shortcuts

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