Versions in this module Expand all Collapse all v0 v0.0.2 Apr 23, 2024 v0.0.1 Jan 31, 2024 Changes in this version + const DirSeparator + const GB + const KB + const MB + const OpaqueWhiteout + const WhiteoutPrefix + var ErrTarStopIteration = fmt.Errorf("halt iterating tar") + func IterateTar(reader io.Reader, visitor TarFileVisitor) error + func MIMEType(reader io.Reader) string + func ReaderFromTar(reader io.ReadCloser, tarPath string) (io.ReadCloser, error) + func UntarToDirectory(reader io.Reader, dst string) error + func WalkSquashFS(r io.ReaderAt, fn SquashFSVisitor) error + func WalkSquashFSFromReader(r io.Reader, fn SquashFSVisitor) error + type ErrFileNotFound struct + Path string + func (e *ErrFileNotFound) Error() string + type ID uint64 + type IDSet map[ID]struct + func NewIDSet(is ...ID) IDSet + func (s IDSet) Add(ids ...ID) + func (s IDSet) Clear() + func (s IDSet) Contains(i ID) bool + func (s IDSet) ContainsAny(ids ...ID) bool + func (s IDSet) List() []ID + func (s IDSet) Merge(other IDSet) + func (s IDSet) Remove(ids ...ID) + func (s IDSet) Size() int + func (s IDSet) Sorted() []ID + type IDs []ID + func (ids IDs) Len() int + func (ids IDs) Less(i, j int) bool + func (ids IDs) Swap(i, j int) + type LazyReadCloser struct + func NewLazyReadCloser(path string) *LazyReadCloser + func (d *LazyReadCloser) Close() error + func (d *LazyReadCloser) Read(b []byte) (n int, err error) + func (d *LazyReadCloser) ReadAt(p []byte, off int64) (n int, err error) + func (d *LazyReadCloser) Seek(offset int64, whence int) (int64, error) + type ManualInfo struct + ModTimeValue time.Time + ModeValue fs.FileMode + NameValue string + SizeValue int64 + SysValue any + func (m ManualInfo) IsDir() bool + func (m ManualInfo) ModTime() time.Time + func (m ManualInfo) Mode() fs.FileMode + func (m ManualInfo) Name() string + func (m ManualInfo) Size() int64 + func (m ManualInfo) Sys() any + type Metadata struct + GroupID int + LinkDestination string + MIMEType string + Path string + Type Type + UserID int + func MetadataFromTar(reader io.ReadCloser, tarPath string) (Metadata, error) + func NewMetadata(header tar.Header, content io.Reader) Metadata + func NewMetadataFromPath(path string, info os.FileInfo) Metadata + func NewMetadataFromSquashFSFile(path string, f *squashfs.File) (Metadata, error) + func (m Metadata) Equal(other Metadata) bool + type Opener func() io.ReadCloser + type Path string + func (p Path) AllPaths() []Path + func (p Path) Basename() string + func (p Path) ConstituentPaths() []Path + func (p Path) IsAbsolutePath() bool + func (p Path) IsDirWhiteout() bool + func (p Path) IsWhiteout() bool + func (p Path) Normalize() Path + func (p Path) ParentPath() (Path, error) + func (p Path) UnWhiteoutPath() (Path, error) + type PathCountSet map[Path]int + func NewPathCountSet(is ...Path) PathCountSet + func (s PathCountSet) Add(ids ...Path) + func (s PathCountSet) Contains(i Path) bool + func (s PathCountSet) Remove(ids ...Path) + type PathSet map[Path]struct + func NewPathSet(is ...Path) PathSet + func (s PathSet) Add(ids ...Path) + func (s PathSet) Clear() + func (s PathSet) Contains(i Path) bool + func (s PathSet) ContainsAny(ids ...Path) bool + func (s PathSet) List() []Path + func (s PathSet) Merge(other PathSet) + func (s PathSet) Remove(ids ...Path) + func (s PathSet) Size() int + func (s PathSet) Sorted() []Path + type PathStack []Path + func (s *PathStack) Pop() Path + func (s *PathStack) Push(n Path) + func (s *PathStack) Size() int + type Paths []Path + func (p Paths) Len() int + func (p Paths) Less(i, j int) bool + func (p Paths) Swap(i, j int) + type Reference struct + RealPath Path + func NewFileReference(path Path) *Reference + func (f *Reference) ID() ID + func (f *Reference) String() string + type ReferenceSet map[ID]struct + func NewFileReferenceSet() ReferenceSet + func (s ReferenceSet) Add(ref Reference) + func (s ReferenceSet) Contains(ref Reference) bool + func (s ReferenceSet) Remove(ref Reference) + type References []*Reference + func (f References) Equal(other References) bool + func (f References) Len() int + func (f References) Less(idx1, idx2 int) bool + func (f References) Swap(idx1, idx2 int) + type Resolution struct + LinkResolutions []Resolution + RequestPath Path + func NewResolution(path Path, ref *Reference, leafs []Resolution) *Resolution + func (f *Resolution) AllPaths() []Path + func (f *Resolution) AllRequestPaths() []Path + func (f *Resolution) HasReference() bool + func (f *Resolution) References() []Reference + func (f *Resolution) RequestResolutionPath() []Path + type Resolutions []Resolution + func (f Resolutions) Len() int + func (f Resolutions) Less(i, j int) bool + func (f Resolutions) Swap(i, j int) + type SquashFSVisitor func(fsys fs.FS, path string, d fs.DirEntry) error + type TarFileEntry struct + Header tar.Header + Reader io.Reader + Sequence int64 + type TarFileVisitor func(TarFileEntry) error + type TarIndex struct + func NewTarIndex(tarFilePath string, onIndex TarIndexVisitor) (*TarIndex, error) + func (t *TarIndex) EntriesByName(name string) ([]TarFileEntry, error) + type TarIndexEntry struct + func (t *TarIndexEntry) Open() io.ReadCloser + func (t *TarIndexEntry) ToTarFileEntry() TarFileEntry + type TarIndexVisitor func(TarIndexEntry) error + type TempDirGenerator struct + func NewTempDirGenerator(name string) *TempDirGenerator + func (t *TempDirGenerator) Cleanup() error + func (t *TempDirGenerator) NewDirectory(name ...string) (string, error) + func (t *TempDirGenerator) NewGenerator() *TempDirGenerator + type Type int + const TypeBlockDevice + const TypeCharacterDevice + const TypeDirectory + const TypeFIFO + const TypeHardLink + const TypeIrregular + const TypeRegular + const TypeSocket + const TypeSymLink + func AllTypes() []Type + func TypeFromMode(mode os.FileMode) Type + func TypeFromTarType(ty byte) Type + func (t Type) String() string