readonly

package
v0.0.0-...-2ec1701 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2014 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

func Mount(ipfs *core.IpfsNode, fpath string) error

Mount mounts an IpfsNode instance at a particular path. It serves until the process receives exit signals (to Unmount).

func Unmount

func Unmount(point string) error

Unmount attempts to unmount the provided FUSE mount point, forcibly if necessary.

Types

type FileSystem

type FileSystem struct {
	Ipfs *core.IpfsNode
}

FileSystem is the readonly Ipfs Fuse Filesystem.

func NewFileSystem

func NewFileSystem(ipfs *core.IpfsNode) *FileSystem

NewFileSystem constructs new fs using given core.IpfsNode instance.

func (FileSystem) Root

func (f FileSystem) Root() (fs.Node, fuse.Error)

Root constructs the Root of the filesystem, a Root object.

type Node

type Node struct {
	Ipfs *core.IpfsNode
	Nd   *mdag.Node
}

Node is the core object representing a filesystem tree node.

func (*Node) Attr

func (s *Node) Attr() fuse.Attr

Attr returns the attributes of a given node.

func (*Node) Lookup

func (s *Node) Lookup(name string, intr fs.Intr) (fs.Node, fuse.Error)

Lookup performs a lookup under this node.

func (*Node) ReadAll

func (s *Node) ReadAll(intr fs.Intr) ([]byte, fuse.Error)

ReadAll reads the object data as file data

func (*Node) ReadDir

func (s *Node) ReadDir(intr fs.Intr) ([]fuse.Dirent, fuse.Error)

ReadDir reads the link structure as directory entries

type Root

type Root struct {
	Ipfs *core.IpfsNode
}

Root is the root object of the filesystem tree.

func (*Root) Attr

func (*Root) Attr() fuse.Attr

Attr returns file attributes.

func (*Root) Lookup

func (s *Root) Lookup(name string, intr fs.Intr) (fs.Node, fuse.Error)

Lookup performs a lookup under this node.

func (*Root) ReadDir

func (*Root) ReadDir(intr fs.Intr) ([]fuse.Dirent, fuse.Error)

ReadDir reads a particular directory. Disallowed for root.

Jump to

Keyboard shortcuts

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