zipfs

package
v0.0.0-...-bc17f6b Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2013 License: BSD-3-Clause Imports: 17 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 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 {
	nodefs.FileSystem

	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 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 (fs *MemTreeFs) OnMount(conn *nodefs.FileSystemConnector)

func (*MemTreeFs) Root

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

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