readonly

package
v0.41.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: Apache-2.0, MIT, Apache-2.0, + 1 more Imports: 20 Imported by: 0

Documentation

Overview

package fuse/readonly implements a fuse filesystem to access files stored inside of ipfs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Mount

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

Mount mounts IPFS at a given location, and returns a mount.Mount instance.

Types

type Node

type Node struct {
	fs.Inode
	// contains filtered or unexported fields
}

Node is the core object representing a filesystem tree node.

func (*Node) Getattr

func (n *Node) Getattr(_ context.Context, _ fs.FileHandle, out *fuse.AttrOut) syscall.Errno

func (*Node) Getxattr added in v0.4.11

func (n *Node) Getxattr(_ context.Context, attr string, dest []byte) (uint32, syscall.Errno)

func (*Node) Listxattr

func (n *Node) Listxattr(_ context.Context, dest []byte) (uint32, syscall.Errno)

func (*Node) Lookup

func (n *Node) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)

func (*Node) Open

func (n *Node) Open(ctx context.Context, _ uint32) (fs.FileHandle, uint32, syscall.Errno)

Open creates a DagReader that is reused across sequential Read calls, avoiding re-traversal of the DAG from the root on each read.

func (*Node) Readdir

func (n *Node) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno)
func (n *Node) Readlink(_ context.Context) ([]byte, syscall.Errno)

type Root

type Root struct {
	fs.Inode
	// contains filtered or unexported fields
}

Root is the root object of the /ipfs filesystem tree.

func NewRoot

func NewRoot(ipfs *core.IpfsNode) *Root

NewRoot constructs a new readonly root node.

func (*Root) Getattr

func (*Root) Getattr(_ context.Context, _ fs.FileHandle, out *fuse.AttrOut) syscall.Errno

func (*Root) Lookup

func (r *Root) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)

func (*Root) Readdir

func (*Root) Readdir(_ context.Context) (fs.DirStream, syscall.Errno)

Readdir on the namespace root is not allowed (execute-only).

func (*Root) Statfs

func (r *Root) Statfs(_ context.Context, out *fuse.StatfsOut) syscall.Errno

Statfs reports disk-space statistics for the underlying filesystem. macOS Finder checks free space before copying; without this it reports "not enough free space" because go-fuse returns zeroed stats.

Jump to

Keyboard shortcuts

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