zipfs

package
v0.0.0-...-82cd6e7 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2012 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CONFIG_PREFIX = "config/"
)

Variables

This section is empty.

Functions

func HeaderToFileInfo

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

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() *fuse.Attr
	Data() []byte
}

type MemTreeFs

type MemTreeFs struct {
	fuse.DefaultNodeFileSystem
	// 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 to inode discovery through Lookup() at serve time.

func NewArchiveFileSystem

func NewArchiveFileSystem(name string) (mfs *MemTreeFs, err error)

func NewMemTreeFs

func NewMemTreeFs() *MemTreeFs

func (*MemTreeFs) OnMount

func (me *MemTreeFs) OnMount(conn *fuse.FileSystemConnector)

func (*MemTreeFs) Root

func (me *MemTreeFs) Root() fuse.FsNode

type MultiZipFs

type MultiZipFs struct {
	fuse.DefaultFileSystem
	// contains filtered or unexported fields
}

MultiZipFs is a path filesystem that mounts zipfiles.

func NewMultiZipFs

func NewMultiZipFs() *MultiZipFs

func (*MultiZipFs) GetAttr

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

func (*MultiZipFs) OnMount

func (me *MultiZipFs) OnMount(nodeFs *fuse.PathNodeFs)

func (*MultiZipFs) OpenDir

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

func (*MultiZipFs) String

func (me *MultiZipFs) String() string
func (me *MultiZipFs) Symlink(value string, linkName string, context *fuse.Context) (code fuse.Status)
func (me *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 (me *TarFile) Data() []byte

func (*TarFile) Stat

func (me *TarFile) Stat() *fuse.Attr

type ZipFile

type ZipFile struct {
	*zip.File
}

func (*ZipFile) Data

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

func (*ZipFile) Stat

func (me *ZipFile) Stat() *fuse.Attr

Jump to

Keyboard shortcuts

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