Documentation ¶
Overview ¶
package fuse/ipns implements a fuse filesystem that interfaces with ipns, the naming system for ipfs.
Index ¶
- func InitializeKeyspace(n *core.IpfsNode, key ci.PrivKey) error
- func Mount(ipfs *core.IpfsNode, ipnsmp, ipfsmp string) (mount.Mount, error)
- type Directory
- func (d *Directory) Attr() fuse.Attr
- func (dir *Directory) Create(ctx context.Context, req *fuse.CreateRequest, resp *fuse.CreateResponse) (fs.Node, fs.Handle, error)
- func (s *Directory) Lookup(ctx context.Context, name string) (fs.Node, error)
- func (dir *Directory) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (fs.Node, error)
- func (dir *Directory) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error)
- func (dir *Directory) Remove(ctx context.Context, req *fuse.RemoveRequest) error
- func (dir *Directory) Rename(ctx context.Context, req *fuse.RenameRequest, newDir fs.Node) error
- type File
- func (fi *File) Attr() fuse.Attr
- func (fi *File) Flush(ctx context.Context, req *fuse.FlushRequest) error
- func (fi *File) Forget()
- func (fi *File) Fsync(ctx context.Context, req *fuse.FsyncRequest) error
- func (fi *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)
- func (fi *File) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error
- func (fi *File) Release(ctx context.Context, req *fuse.ReleaseRequest) error
- func (fi *File) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error
- type FileSystem
- type Link
- type Root
- type WriteAtBuf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeKeyspace ¶
InitializeKeyspace sets the ipns record for the given key to point to an empty directory.
Types ¶
type Directory ¶ added in v0.3.2
Directory is wrapper over an ipnsfs directory to satisfy the fuse fs interface
func (*Directory) ReadDirAll ¶ added in v0.3.2
ReadDirAll reads the link structure as directory entries
type File ¶ added in v0.3.2
File is wrapper over an ipnsfs file to satisfy the fuse fs interface
func (*File) Fsync ¶ added in v0.3.2
Fsync flushes the content in the file to disk, but does not update the dag tree internally
func (*File) Open ¶ added in v0.3.2
func (fi *File) Open(ctx context.Context, req *fuse.OpenRequest, resp *fuse.OpenResponse) (fs.Handle, error)
func (*File) Read ¶ added in v0.3.2
func (fi *File) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error
func (*File) Write ¶ added in v0.3.2
func (fi *File) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error
type FileSystem ¶
FileSystem is the readwrite IPNS Fuse Filesystem.
func NewFileSystem ¶
NewFileSystem constructs new fs using given core.IpfsNode instance.
func (*FileSystem) Destroy ¶ added in v0.3.2
func (f *FileSystem) Destroy()
type Root ¶
type Root struct { Ipfs *core.IpfsNode Keys []ci.PrivKey // Used for symlinking into ipfs IpfsRoot string LocalDirs map[string]fs.Node Roots map[string]*nsfs.KeyRoot LocalLink *Link // contains filtered or unexported fields }
Root is the root object of the filesystem tree.
func CreateRoot ¶
func (*Root) Forget ¶ added in v0.3.2
func (r *Root) Forget()
Forget is called when the filesystem is unmounted. probably. see comments here: http://godoc.org/bazil.org/fuse/fs#FSDestroyer
type WriteAtBuf ¶
func NewWriterAtFromBytes ¶
func NewWriterAtFromBytes(b []byte) WriteAtBuf