Documentation ¶
Overview ¶
Package squashfs implements writing SquashFS file system images using zlib compression for data blocks (inodes and directory entries are written uncompressed for simplicity).
Note that SquashFS requires directory entries to be sorted, i.e. files and directories need to be added in the correct order.
This package intentionally only implements a subset of SquashFS. Notably, block devices, character devices, FIFOs, sockets and xattrs are not supported.
Index ¶
- type Directory
- func (d *Directory) Directory(name string, modTime time.Time) *Directory
- func (d *Directory) File(name string, modTime time.Time, mode os.FileMode) (io.WriteCloser, error)
- func (d *Directory) Flush() error
- func (d *Directory) Symlink(oldname, newname string, modTime time.Time, mode os.FileMode) error
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Directory ¶
type Directory struct {
// contains filtered or unexported fields
}
Directory represents a SquashFS directory.
func (*Directory) Directory ¶
Directory creates a new directory with the specified name and modTime.
func (*Directory) File ¶
File creates a file with the specified name, modTime and mode. The returned io.WriterCloser must be closed after writing the file.
type Writer ¶
type Writer struct { // Root represents the file system root. Like all directories, Flush must be // called precisely once. Root *Directory // contains filtered or unexported fields }