提交 f77dbe0a 作者: Juan Batiz-Benet

fuse/ipns: implement NodeReadlinker

上级 9d167cd5
...@@ -4,6 +4,7 @@ import ( ...@@ -4,6 +4,7 @@ import (
"os" "os"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/bazil.org/fuse" "github.com/jbenet/go-ipfs/Godeps/_workspace/src/bazil.org/fuse"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/bazil.org/fuse/fs"
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" "github.com/jbenet/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
) )
...@@ -18,7 +19,9 @@ func (l *Link) Attr() fuse.Attr { ...@@ -18,7 +19,9 @@ func (l *Link) Attr() fuse.Attr {
} }
} }
func (l *Link) Readlink(req *fuse.ReadlinkRequest, ctx context.Context) (string, error) { func (l *Link) Readlink(ctx context.Context, req *fuse.ReadlinkRequest) (string, error) {
log.Debugf("ReadLink: %s", l.Target) log.Debugf("ReadLink: %s", l.Target)
return l.Target, nil return l.Target, nil
} }
var _ fs.NodeReadlinker = (*Link)(nil)
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论