zipfs

package
v0.0.0-...-a9df4fd Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZipFS

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

ZipFS implements io/fs.ReadFileFS, io/fs.SubFS, and io/fs.ReadDirFS interfaces for a zip archive. It provides a read-only filesystem interface to access files and directories within the zip archive.

func NewZipFS

func NewZipFS(r *zip.Reader) *ZipFS

NewZipFS creates a new ZipFS instance from an archive/zip.Reader.

func (*ZipFS) Open

func (z *ZipFS) Open(name string) (fs.File, error)

Open implements fs.FS

func (*ZipFS) ReadDir

func (z *ZipFS) ReadDir(name string) ([]fs.DirEntry, error)

ReadDir implements fs.ReadDirFS.

func (*ZipFS) ReadFile

func (z *ZipFS) ReadFile(name string) ([]byte, error)

ReadFile implements fs.ReadFileFS

func (*ZipFS) Sub

func (z *ZipFS) Sub(dir string) (fs.FS, error)

Sub implements fs.SubFS

Jump to

Keyboard shortcuts

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