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

Method SetSymlinkTarget

pkg/schema/blob.go:518–526  ·  view source on GitHub ↗

SetSymlinkTarget sets bb to be of type "symlink" and sets the symlink's target.

(target string)

Source from the content-addressed store, hash-verified

516
517// SetSymlinkTarget sets bb to be of type "symlink" and sets the symlink's target.
518func (bb *Builder) SetSymlinkTarget(target string) *Builder {
519 bb.SetType(TypeSymlink)
520 if utf8.ValidString(target) {
521 bb.m["symlinkTarget"] = target
522 } else {
523 bb.m["symlinkTargetBytes"] = mixedArrayFromString(target)
524 }
525 return bb
526}
527
528// IsClaimType returns whether this blob builder is for a type
529// which should be signed. (a "claim" or "permanode")

Callers 2

uploadNodeMethod · 0.80

Calls 2

SetTypeMethod · 0.95
mixedArrayFromStringFunction · 0.85

Tested by 1