snapdir

package
v0.0.0-...-ab92e14 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: GPL-3.0 Imports: 7 Imported by: 51

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsSnapDir

func IsSnapDir(path string) bool

func NewContainerFromDir

func NewContainerFromDir(path string) snap.Container

NewContainerFromDir returns a snap.Container that is implemented by a SnapDir. It should be used as the implementation of snap.NewContainerFromDir.

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

func (s *SnapDir) Lstat(file string) (os.FileInfo, 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 (s *SnapDir) ReadLink(file string) (string, 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