Documentation ¶
Index ¶
- Constants
- type ZipFileSystem
- func (f *ZipFileSystem) AbsPath(filePath string) string
- func (f *ZipFileSystem) CleanPathFromURI(uri string) string
- func (f *ZipFileSystem) Close() error
- func (f *ZipFileSystem) Exists(filePath string) bool
- func (f *ZipFileSystem) File(filePath string) fs.File
- func (f *ZipFileSystem) ID() (string, error)
- func (f *ZipFileSystem) IsAbsPath(filePath string) bool
- func (f *ZipFileSystem) IsHidden(filePath string) bool
- func (f *ZipFileSystem) IsSymbolicLink(filePath string) bool
- func (f *ZipFileSystem) JoinCleanFile(uriParts ...string) fs.File
- func (f *ZipFileSystem) JoinCleanPath(uriParts ...string) string
- func (f *ZipFileSystem) ListDirInfo(ctx context.Context, dirPath string, callback func(*fs.FileInfo) error, ...) (err error)
- func (f *ZipFileSystem) ListDirInfoRecursive(ctx context.Context, dirPath string, callback func(*fs.FileInfo) error, ...) error
- func (f *ZipFileSystem) MakeDir(dirPath string, perm []fs.Permissions) error
- func (*ZipFileSystem) MatchAnyPattern(name string, patterns []string) (bool, error)
- func (f *ZipFileSystem) Name() string
- func (f *ZipFileSystem) OpenReadWriter(filePath string, perm []fs.Permissions) (fs.ReadWriteSeekCloser, error)
- func (f *ZipFileSystem) OpenReader(filePath string) (iofs.File, error)
- func (f *ZipFileSystem) OpenWriter(filePath string, perm []fs.Permissions) (fs.WriteCloser, error)
- func (f *ZipFileSystem) Prefix() string
- func (f *ZipFileSystem) ReadableWritable() (readable, writable bool)
- func (f *ZipFileSystem) Remove(filePath string) error
- func (f *ZipFileSystem) RootDir() fs.File
- func (*ZipFileSystem) Separator() string
- func (*ZipFileSystem) SplitDirAndName(filePath string) (dir, name string)
- func (f *ZipFileSystem) SplitPath(filePath string) []string
- func (f *ZipFileSystem) Stat(filePath string) (iofs.FileInfo, error)
- func (f *ZipFileSystem) String() string
- func (f *ZipFileSystem) Touch(filePath string, perm []fs.Permissions) error
- func (f *ZipFileSystem) URL(cleanPath string) string
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 (*ZipFileSystem) IsSymbolicLink ¶
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 (*ZipFileSystem) ListDirInfoRecursive ¶
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) 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) 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
Click to show internal directories.
Click to hide internal directories.