mirror of
https://github.com/ipfs/kubo.git
synced 2026-03-02 14:58:03 +08:00
* go-log * sys * go-crypto License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
29 lines
556 B
Go
29 lines
556 B
Go
// +build !nofuse
|
|
|
|
package ipns
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
|
|
"gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse"
|
|
"gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse/fs"
|
|
)
|
|
|
|
type Link struct {
|
|
Target string
|
|
}
|
|
|
|
func (l *Link) Attr(ctx context.Context, a *fuse.Attr) error {
|
|
log.Debug("Link attr.")
|
|
a.Mode = os.ModeSymlink | 0555
|
|
return nil
|
|
}
|
|
|
|
func (l *Link) Readlink(ctx context.Context, req *fuse.ReadlinkRequest) (string, error) {
|
|
log.Debugf("ReadLink: %s", l.Target)
|
|
return l.Target, nil
|
|
}
|
|
|
|
var _ fs.NodeReadlinker = (*Link)(nil)
|