https://github.com/ipfs/go-ipfs
Raw File
Tip revision: e33f8877009f306687270337dd2a97c360389826 authored by Petar Maymounkov on 14 October 2020, 22:56:40 UTC
add xz to dockerfile
Tip revision: e33f887
link_unix.go
// +build !nofuse,!openbsd,!netbsd,!plan9

package ipns

import (
	"context"
	"os"

	"bazil.org/fuse"
	"bazil.org/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)
back to top