Documentation ¶
Index ¶
- Constants
- func BuildDate(path string) time.Time
- func FileHasSquashfsHeader(path string) bool
- type BuildOpts
- type MksquashfsError
- type Snap
- func (s *Snap) Build(sourceDir string, opts *BuildOpts) error
- func (s *Snap) BuildDate() time.Time
- func (s *Snap) Install(targetPath, mountDir string, opts *snap.InstallOptions) (bool, error)
- func (s *Snap) ListDir(dirPath string) ([]string, error)
- func (s *Snap) Lstat(filePath string) (os.FileInfo, error)
- func (s *Snap) Path() string
- func (s *Snap) RandomAccessFile(filePath string) (interface{ ... }, error)
- func (s *Snap) ReadFile(filePath string) (content []byte, err error)
- func (s *Snap) ReadLink(filePath string) (string, error)
- func (s *Snap) Size() (size int64, err error)
- func (s *Snap) Unpack(src, dstDir string) error
- func (s *Snap) Walk(relative string, walkFn filepath.WalkFunc) error
- type SnapFileOwner
Constants ¶
const MinimumSnapSize int64 = 16384
MinimumSnapSize is the smallest size a snap can be. The kernel attempts to read a partition table from the snap when a loopback device is created from it. If the snap is smaller than this size, some versions of the kernel will print error logs while scanning the loopback device for partitions. TODO: revisit if necessary, some distros (eg. openSUSE) patch squashfs-tools to pad to 64k but kernel should work with this
Variables ¶
This section is empty.
Functions ¶
func FileHasSquashfsHeader ¶
Types ¶
type MksquashfsError ¶
type MksquashfsError struct {
// contains filtered or unexported fields
}
func (MksquashfsError) Error ¶
func (m MksquashfsError) Error() string
type Snap ¶
type Snap struct {
// contains filtered or unexported fields
}
Snap is the squashfs based snap.
func (*Snap) BuildDate ¶
BuildDate returns the "Creation or last append time" as reported by unsquashfs.
func (*Snap) RandomAccessFile ¶
func (s *Snap) RandomAccessFile(filePath string) (interface { io.ReaderAt io.Closer Size() int64 }, error)
RandomAccessFile returns an implementation to read at any given location for a single file inside the squashfs snap plus information about the file size.