squashfs

package
v2.42.5-go-mod+incompa... Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2020 License: GPL-3.0 Imports: 15 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

func BuildDate

func BuildDate(path string) time.Time

BuildDate returns the "Creation or last append time" as reported by unsquashfs.

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(sourceDir, snapType string, excludeFiles ...string) error

Build builds the snap.

func (*Snap) BuildDate

func (s *Snap) BuildDate() time.Time

BuildDate returns the "Creation or last append time" as reported by unsquashfs.

func (*Snap) Install

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

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.

func (*Snap) Size

func (s *Snap) Size() (size int64, err error)

Size returns the size of a squashfs snap.

func (*Snap) Unpack

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

func (*Snap) Walk

func (s *Snap) Walk(relative string, walkFn filepath.WalkFunc) error

Walk (part of snap.Container) is like filepath.Walk, without the ordering guarantee.

type SnapFileOwner

type SnapFileOwner struct {
	UID uint32
	GID uint32
}

Jump to

Keyboard shortcuts

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