Documentation ¶
Overview ¶
Package tarfs is used to extract a tar file in memory and present it as a minimalistic read-only filesystem.
Index ¶
- type FileInTar
- func (f *FileInTar) Close() error
- func (f *FileInTar) IsDir() bool
- func (f *FileInTar) ModTime() time.Time
- func (f *FileInTar) Mode() fs.FileMode
- func (f *FileInTar) Name() string
- func (f *FileInTar) NewOpenFile() *FileInTar
- func (f *FileInTar) Read(p []byte) (int, error)
- func (f *FileInTar) Size() int64
- func (f *FileInTar) Stat() (fs.FileInfo, error)
- func (f *FileInTar) Sys() interface{}
- type TarFS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileInTar ¶
FileInTar represents a combination of fs.File and fs.FileInfo interfaces.
func (*FileInTar) ModTime ¶
ModTime returns the last modified time of the file which corresponds to when the file was extracted from the tar archive.
func (*FileInTar) NewOpenFile ¶
NewOpenFile creates a copy of the current file to represent a newly opened file.
type TarFS ¶
TarFS is a minimal in-memory filesystem constructed from a tar archive. It is inefficient due to its copying of data for each open file request.
func NewTarFSFromBytes ¶
NewTarFSFromBytes creates a new tar filesystem from the given byte data representing a tar archive.