MCPcopy Index your code
hub / github.com/perkeep/perkeep / Readlink

Method Readlink

pkg/fs/ro.go:369–378  ·  view source on GitHub ↗
(ctx context.Context, req *fuse.ReadlinkRequest)

Source from the content-addressed store, hash-verified

367}
368
369func (n *roFile) Readlink(ctx context.Context, req *fuse.ReadlinkRequest) (string, error) {
370 Logger.Printf("roFile.Readlink(%q)", n.fullPath())
371 n.mu.Lock()
372 defer n.mu.Unlock()
373 if !n.symLink {
374 Logger.Printf("roFile.Readlink on node that's not a symlink?")
375 return "", fuse.EIO
376 }
377 return n.target, nil
378}
379
380// roFileOrDir is a *roFile or *roDir
381type roFileOrDir interface {

Callers 6

TestNonUTF8SymlinkTargetFunction · 0.45
TestCamgetSymlinkFunction · 0.45
TestSymlinkFunction · 0.45
GetPINMethod · 0.45
GetPassphraseMethod · 0.45
uploadNodeMethod · 0.45

Calls 4

fullPathMethod · 0.95
PrintfMethod · 0.80
LockMethod · 0.80
UnlockMethod · 0.80

Tested by 3

TestNonUTF8SymlinkTargetFunction · 0.36
TestCamgetSymlinkFunction · 0.36
TestSymlinkFunction · 0.36