zipfs

package
v0.0.0-...-4e130d8 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2015 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONFIG_PREFIX = "config/"
)

Variables

This section is empty.

Functions

func HeaderToFileInfo

func HeaderToFileInfo(out *fuse.Attr, h *tar.Header)

func NewArchiveFileSystem

func NewArchiveFileSystem(name string) (root nodefs.Node, err error)

func NewTarCompressedTree

func NewTarCompressedTree(name string, format string) (map[string]MemFile, error)

func NewTarTree

func NewTarTree(r io.Reader) map[string]MemFile

func NewZipTree

func NewZipTree(name string) (map[string]MemFile, error)

NewZipTree creates a new file-system for the zip file named name.

Types

type MemFile

type MemFile interface {
	Stat(out *fuse.Attr)
	Data() []byte
}

type MemTreeFs

type MemTreeFs struct {
	Name string
	// contains filtered or unexported fields
}

memTreeFs creates a tree of internal Inodes. Since the tree is loaded in memory completely at startup, it does not need inode discovery through Lookup() at serve time.

func NewMemTreeFs

func NewMemTreeFs(files map[string]MemFile) *MemTreeFs

func (*MemTreeFs) Root

func (fs *MemTreeFs) Root() nodefs.Node

func (*MemTreeFs) SetDebug

func (fs *MemTreeFs) SetDebug(bool)

func (*MemTreeFs) String

func (fs *MemTreeFs) String() string

type MultiZipFs

type MultiZipFs struct {
	pathfs.FileSystem
	// contains filtered or unexported fields
}

MultiZipFs is a path filesystem that mounts zipfiles.

func NewMultiZipFs

func NewMultiZipFs() *MultiZipFs

func (*MultiZipFs) GetAttr

func (fs *MultiZipFs) GetAttr(name string, context *fuse.Context) (*fuse.Attr, fuse.Status)

func (*MultiZipFs) OnMount

func (fs *MultiZipFs) OnMount(nodeFs *pathfs.PathNodeFs)

func (*MultiZipFs) OpenDir

func (fs *MultiZipFs) OpenDir(name string, context *fuse.Context) (stream []fuse.DirEntry, code fuse.Status)
func (fs *MultiZipFs) Readlink(path string, context *fuse.Context) (val string, code fuse.Status)

func (*MultiZipFs) String

func (fs *MultiZipFs) String() string
func (fs *MultiZipFs) Symlink(value string, linkName string, context *fuse.Context) (code fuse.Status)
func (fs *MultiZipFs) Unlink(name string, context *fuse.Context) (code fuse.Status)

type TarFile

type TarFile struct {
	tar.Header
	// contains filtered or unexported fields
}

func (*TarFile) Data

func (f *TarFile) Data() []byte

func (*TarFile) Stat

func (f *TarFile) Stat(out *fuse.Attr)

type ZipFile

type ZipFile struct {
	*zip.File
}

func (*ZipFile) Data

func (f *ZipFile) Data() []byte

func (*ZipFile) Stat

func (f *ZipFile) Stat(out *fuse.Attr)

Jump to

Keyboard shortcuts

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