zipfs

package
v0.0.0-...-f6eb2df Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrReadOnly is returned if the file is read-only and write operations are disabled.
	ErrReadOnly = errors.New("File is read-only")
	// ErrWriteOnly is returned if the file is write-only and read operations are disabled.
	ErrWriteOnly = errors.New("File is write-only")
	// ErrIsDirectory is returned if the file under operation is not a regular file but a directory.
	ErrIsDirectory = errors.New("Is directory")

	ErrNotPerm = errors.New("Operation not permitted")

	ErrNotExist = errors.New("File does not exist")
)

Functions

This section is empty.

Types

type File

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

func (File) Close

func (f File) Close() error

func (File) Name

func (f File) Name() string

func (File) Read

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

func (File) ReadAt

func (f File) ReadAt(p []byte, off int64) (n int, err error)

func (File) Seek

func (f File) Seek(offset int64, whence int) (n int64, err error)

func (File) Stat

func (f File) Stat() (os.FileInfo, error)

func (File) Sync

func (f File) Sync() error

func (File) Truncate

func (f File) Truncate(size int64) (err error)

func (File) Write

func (f File) Write(p []byte) (int, error)

type ZipFS

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

func Create

func Create(f vfs.File, size int64) (ZipFS, error)

func (ZipFS) Lstat

func (f ZipFS) Lstat(name string) (os.FileInfo, error)

func (ZipFS) Mkdir

func (f ZipFS) Mkdir(name string, perm os.FileMode) error

func (ZipFS) OpenFile

func (f ZipFS) OpenFile(name string, flag int, perm os.FileMode) (vfs.File, error)

func (ZipFS) PathSeparator

func (f ZipFS) PathSeparator() uint8

func (ZipFS) ReadDir

func (f ZipFS) ReadDir(fp string) (entries []filesystem.FileInfo, err error)

func (ZipFS) Remove

func (f ZipFS) Remove(name string) error

func (ZipFS) Rename

func (f ZipFS) Rename(oldpath, newpath string) error

func (ZipFS) Stat

func (f ZipFS) Stat(name string) (filesystem.FileInfo, error)

func (ZipFS) Unmount

func (f ZipFS) Unmount() error

Jump to

Keyboard shortcuts

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