Documentation ¶
Overview ¶
此源码被清华学神尹成大魔王专业翻译分析并修改 尹成QQ77025077 尹成微信18510341407 尹成所在QQ群721929980 尹成邮箱 yinc13@mails.tsinghua.edu.cn 尹成毕业于清华大学,微软区块链领域全球最有价值专家 https://mvp.microsoft.com/zh-cn/PublicProfile/4033620
package fuse/ipns实现了一个fuse文件系统,该文件系统与 有了IPN,IPF的命名系统。
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(ctx context.Context, a *fuse.Attr) error
- 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) Flush(ctx context.Context, req *fuse.FlushRequest) error
- func (fi *File) Forget()
- 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) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error
- func (fi *File) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error
- type FileNode
- type FileSystem
- type Link
- type Root
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeKeyspace ¶
InitializeKeyspace将给定密钥的IPN记录设置为 指向空目录。
Types ¶
type Directory ¶
type Directory struct {
// contains filtered or unexported fields
}
目录是对mfs目录的包装,以满足fuse fs接口
func (*Directory) ReadDirAll ¶
readdirall将链接结构作为目录项读取
type File ¶
type File struct {
// contains filtered or unexported fields
}
文件是对mfs文件的包装,以满足fuse fs接口
func (*File) Read ¶
func (fi *File) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadResponse) error
func (*File) Setattr ¶
func (fi *File) Setattr(ctx context.Context, req *fuse.SetattrRequest, resp *fuse.SetattrResponse) error
func (*File) Write ¶
func (fi *File) Write(ctx context.Context, req *fuse.WriteRequest, resp *fuse.WriteResponse) error
type FileNode ¶
type FileNode struct {
// contains filtered or unexported fields
}
type FileSystem ¶
filesystem是readwrite ipns fuse文件系统。
func NewFileSystem ¶
func NewFileSystem(ipfs *core.IpfsNode, sk ci.PrivKey, ipfspath, ipnspath string) (*FileSystem, error)
newfilesystem使用给定的core.ipfsnode实例构造新的fs。
func (*FileSystem) Destroy ¶
func (f *FileSystem) Destroy()
type Root ¶
type Root struct { Ipfs *core.IpfsNode Keys map[string]ci.PrivKey //用于与IPF的符号链接 IpfsRoot string IpnsRoot string LocalDirs map[string]fs.Node Roots map[string]*keyRoot LocalLinks map[string]*Link }
根是文件系统树的根对象。
func CreateRoot ¶
func (*Root) Forget ¶
func (r *Root) Forget()
当卸载文件系统时调用forget。可能。 参见评论:http://godoc.org/bazil.org/fuse/fsdestroyer
Click to show internal directories.
Click to hide internal directories.