snapdir

package
v0.0.0-...-c7fba9c Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSnapDir

func IsSnapDir(path string) bool

Types

type SnapDir

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

SnapDir is the snapdir based snap.

func New

func New(path string) *SnapDir

New returns a new snap directory container.

func (*SnapDir) Install

func (s *SnapDir) Install(targetPath, mountDir string, opts *snap.InstallOptions) (bool, error)

func (*SnapDir) ListDir

func (s *SnapDir) ListDir(path string) ([]string, error)

func (*SnapDir) Path

func (s *SnapDir) Path() string

Path returns the path of the backing container.

func (*SnapDir) RandomAccessFile

func (s *SnapDir) RandomAccessFile(file string) (interface {
	io.ReaderAt
	io.Closer
	Size() int64
}, error)

func (*SnapDir) ReadFile

func (s *SnapDir) ReadFile(file string) (content []byte, err error)

func (*SnapDir) Size

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

func (*SnapDir) Unpack

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

func (*SnapDir) Walk

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

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

Jump to

Keyboard shortcuts

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