tarfs

package
v0.0.0-...-bab6300 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Header tar.Header
	Offset int64

	Filename string
	Dir      string
	// contains filtered or unexported fields
}

func (Entry) Info

func (e Entry) Info() (fs.FileInfo, error)

func (Entry) IsDir

func (e Entry) IsDir() bool

func (Entry) Name

func (e Entry) Name() string

func (Entry) Size

func (e Entry) Size() int64

func (Entry) Type

func (e Entry) Type() fs.FileMode

type FS

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

func Decode

func Decode(ra io.ReaderAt, r io.Reader) (*FS, error)

func New

func New(ra io.ReaderAt) (*FS, error)

func (*FS) Encode

func (fsys *FS) Encode(w io.Writer) error

func (*FS) Entry

func (fsys *FS) Entry(name string) (*Entry, error)

func (*FS) Open

func (fsys *FS) Open(name string) (fs.File, error)

Open implements fs.FS.

func (*FS) ReadDir

func (fsys *FS) ReadDir(name string) ([]fs.DirEntry, error)
func (fsys *FS) Readlink(name string) (string, error)

func (*FS) Stat

func (fsys *FS) Stat(name string) (fs.FileInfo, error)

type File

type File struct {
	Entry *Entry
	// contains filtered or unexported fields
}

func (*File) Close

func (f *File) Close() error

func (*File) Read

func (f *File) Read(p []byte) (int, error)

func (*File) ReadAt

func (f *File) ReadAt(p []byte, off int64) (int, error)

func (*File) ReadDir

func (f *File) ReadDir(n int) ([]fs.DirEntry, error)

TODO: Respect n.

func (*File) Seek

func (f *File) Seek(offset int64, whence int) (int64, error)

func (*File) Stat

func (f *File) Stat() (fs.FileInfo, error)

type TOC

type TOC struct {
	Entries []*Entry
}

Jump to

Keyboard shortcuts

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