tarfs

package
v2.0.0-...-c472316 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TarFS

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

TarFS represents a file system (an fs.FS) based on a tar archive.

func New

func New(path string) (*TarFS, error)

New returns a file system (an fs.FS) for a tar archive located at path.

func (*TarFS) Open

func (tfs *TarFS) Open(name string) (file fs.File, openErr error)

Open opens the named file. When Open returns an error, it should be of type *PathError with the Op field set to "open", the Path field set to name, and the Err field describing the problem.

Open should reject attempts to open names that do not satisfy ValidPath(name), returning a *PathError with Err set to ErrInvalid or ErrNotExist.

func (*TarFS) Stat

func (tfs *TarFS) Stat(name string) (fs.FileInfo, error)

Stat returns a FileInfo describing the file. If there is an error, it should be of type *PathError.

Jump to

Keyboard shortcuts

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