zipasfolder

package
v2.0.33 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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSubFS

func NewSubFS(fsys FSRW, dir string) *subFS

Types

type FS

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

func (*FS) ClearUnlocked

func (fsys *FS) ClearUnlocked() error

func (*FS) Close

func (fsys *FS) Close() error

func (*FS) Create

func (fsys *FS) Create(path string) (FileW, error)

func (*FS) MkDir

func (fsys *FS) MkDir(path string) error

func (*FS) Open

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

func (*FS) ReadDir

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

func (*FS) ReadFile

func (fsys *FS) ReadFile(name string) ([]byte, error)

func (*FS) Stat

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

func (*FS) Sub

func (fsys *FS) Sub(dir string) (FSRW, error)

type FSRW

type FSRW interface {
	fs.StatFS
	Create(path string) (FileW, error)
	MkDir(path string) error
}

func NewDummyOSRW

func NewDummyOSRW(dir string) FSRW

func NewFS

func NewFS(baseFS FSRW, cacheSize int) FSRW

type FSRWClose

type FSRWClose interface {
	Close() error
}

type File

type File struct {
	io.ReadCloser
	// contains filtered or unexported fields
}

func NewFile

func NewFile(fileInfo fs.FileInfo, rc io.ReadCloser, lock *Mutex) *File

func (*File) Close

func (rcm *File) Close() error

func (*File) Stat

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

type FileW

type FileW interface {
	io.WriteCloser
}

type Mutex

type Mutex struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewMutex

func NewMutex() *Mutex

func (*Mutex) IsLocked

func (m *Mutex) IsLocked() bool

func (*Mutex) Lock

func (m *Mutex) Lock()

func (*Mutex) Unlock

func (m *Mutex) Unlock()

type ZIPFS

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

func NewZIPFS

func NewZIPFS(zipReader *zip.Reader, zipFile fs.File) *ZIPFS

func (*ZIPFS) Close

func (zipFS *ZIPFS) Close() error

func (*ZIPFS) IsLocked

func (zipFS *ZIPFS) IsLocked() bool

func (*ZIPFS) Open

func (zipFS *ZIPFS) Open(name string) (fs.File, error)

func (*ZIPFS) ReadDir

func (zipFS *ZIPFS) ReadDir(name string) ([]fs.DirEntry, error)

func (*ZIPFS) Stat

func (zipFS *ZIPFS) Stat(name string) (fs.FileInfo, error)

type ZIPFSDirEntry

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

func NewZIPFSDirEntry

func NewZIPFSDirEntry(info fs.FileInfo) *ZIPFSDirEntry

func (*ZIPFSDirEntry) Info

func (zfsde *ZIPFSDirEntry) Info() (fs.FileInfo, error)

func (*ZIPFSDirEntry) IsDir

func (zfsde *ZIPFSDirEntry) IsDir() bool

func (*ZIPFSDirEntry) Name

func (zfsde *ZIPFSDirEntry) Name() string

func (*ZIPFSDirEntry) Type

func (zfsde *ZIPFSDirEntry) Type() fs.FileMode

type ZIPFSFileInfoDir

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

func NewZIPFSFileInfoDir

func NewZIPFSFileInfoDir(name string) *ZIPFSFileInfoDir

func (*ZIPFSFileInfoDir) IsDir

func (zfsfid *ZIPFSFileInfoDir) IsDir() bool

func (*ZIPFSFileInfoDir) ModTime

func (zfsfid *ZIPFSFileInfoDir) ModTime() time.Time

func (*ZIPFSFileInfoDir) Mode

func (zfsfid *ZIPFSFileInfoDir) Mode() fs.FileMode

func (*ZIPFSFileInfoDir) Name

func (zfsfid *ZIPFSFileInfoDir) Name() string

func (*ZIPFSFileInfoDir) Size

func (zfsfid *ZIPFSFileInfoDir) Size() int64

func (*ZIPFSFileInfoDir) Sys

func (zfsfid *ZIPFSFileInfoDir) Sys() any

Jump to

Keyboard shortcuts

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