zipfs

package module
v0.0.0-...-348f5c2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: MIT Imports: 6 Imported by: 0 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

zipfs

doc

This package implements a fs.FS for zip archives until https://github.com/golang/go/issues/43872 is solved.

Documentation

Overview

Package zipfs provides an io/fs implementation to access zip files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS

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

FS implements a read-only file system for zip files.

func New

func New(base fsio.ReadSeekerAt) (*FS, error)

New creates a new zip FS.

func (*FS) Open

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

Open opens a file for reading.

type File

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

File describes files and directories in the zip file system.

func (*File) Close

func (f *File) Close() (err error)

Close closes the file freeing the resource. Other IO operations fail after closing.

func (*File) Name

func (f *File) Name() string

Name returns the name of the file.

func (*File) Read

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

Read reads bytes into the passed buffer.

func (*File) ReadDir

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

Readdirnames returns up to n child items of a directory.

func (*File) Stat

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

Stat return an fs.FileInfo object that describes a file.

func (*File) Sys

func (f *File) Sys() interface{}

Sys returns underlying data source.

Jump to

Keyboard shortcuts

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