zipfs

package
v0.0.0-...-a606985 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Prefix for the ZipFileSystem
	Prefix = "zip://"

	// Separator used in ZipFileSystem paths
	Separator = "/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ZipFileSystem

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

ZipFileSystem

func NewReaderFileSystem

func NewReaderFileSystem(file fs.FileReader) (zipfs *ZipFileSystem, err error)

func NewWriterFileSystem

func NewWriterFileSystem(file fs.File) (zipfs *ZipFileSystem, err error)

func (*ZipFileSystem) AbsPath

func (f *ZipFileSystem) AbsPath(filePath string) string

func (*ZipFileSystem) CleanPathFromURI

func (f *ZipFileSystem) CleanPathFromURI(uri string) string

func (*ZipFileSystem) Close

func (f *ZipFileSystem) Close() error

func (*ZipFileSystem) Exists

func (f *ZipFileSystem) Exists(filePath string) bool

func (*ZipFileSystem) File

func (f *ZipFileSystem) File(filePath string) fs.File

func (*ZipFileSystem) ID

func (f *ZipFileSystem) ID() (string, error)

func (*ZipFileSystem) IsAbsPath

func (f *ZipFileSystem) IsAbsPath(filePath string) bool

func (*ZipFileSystem) IsHidden

func (f *ZipFileSystem) IsHidden(filePath string) bool
func (f *ZipFileSystem) IsSymbolicLink(filePath string) bool

func (*ZipFileSystem) JoinCleanFile

func (f *ZipFileSystem) JoinCleanFile(uriParts ...string) fs.File

func (*ZipFileSystem) JoinCleanPath

func (f *ZipFileSystem) JoinCleanPath(uriParts ...string) string

func (*ZipFileSystem) ListDirInfo

func (f *ZipFileSystem) ListDirInfo(ctx context.Context, dirPath string, callback func(*fs.FileInfo) error, patterns []string) (err error)

func (*ZipFileSystem) ListDirInfoRecursive

func (f *ZipFileSystem) ListDirInfoRecursive(ctx context.Context, dirPath string, callback func(*fs.FileInfo) error, patterns []string) error

func (*ZipFileSystem) MakeDir

func (f *ZipFileSystem) MakeDir(dirPath string, perm []fs.Permissions) error

func (*ZipFileSystem) MatchAnyPattern

func (*ZipFileSystem) MatchAnyPattern(name string, patterns []string) (bool, error)

MatchAnyPattern returns true if name matches any of patterns, or if len(patterns) == 0. The match per pattern works like path.Match or filepath.Match

func (*ZipFileSystem) Name

func (f *ZipFileSystem) Name() string

func (*ZipFileSystem) OpenReadWriter

func (f *ZipFileSystem) OpenReadWriter(filePath string, perm []fs.Permissions) (fs.ReadWriteSeekCloser, error)

func (*ZipFileSystem) OpenReader

func (f *ZipFileSystem) OpenReader(filePath string) (iofs.File, error)

func (*ZipFileSystem) OpenWriter

func (f *ZipFileSystem) OpenWriter(filePath string, perm []fs.Permissions) (fs.WriteCloser, error)

func (*ZipFileSystem) Prefix

func (f *ZipFileSystem) Prefix() string

Prefix for the ZipFileSystem

func (*ZipFileSystem) ReadableWritable

func (f *ZipFileSystem) ReadableWritable() (readable, writable bool)

func (*ZipFileSystem) Remove

func (f *ZipFileSystem) Remove(filePath string) error

func (*ZipFileSystem) RootDir

func (f *ZipFileSystem) RootDir() fs.File

func (*ZipFileSystem) Separator

func (*ZipFileSystem) Separator() string

func (*ZipFileSystem) SplitDirAndName

func (*ZipFileSystem) SplitDirAndName(filePath string) (dir, name string)

func (*ZipFileSystem) SplitPath

func (f *ZipFileSystem) SplitPath(filePath string) []string

func (*ZipFileSystem) Stat

func (f *ZipFileSystem) Stat(filePath string) (iofs.FileInfo, error)

func (*ZipFileSystem) String

func (f *ZipFileSystem) String() string

String implements the fmt.Stringer interface.

func (*ZipFileSystem) Touch

func (f *ZipFileSystem) Touch(filePath string, perm []fs.Permissions) error

func (*ZipFileSystem) URL

func (f *ZipFileSystem) URL(cleanPath string) string

Jump to

Keyboard shortcuts

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