MCPcopy
hub / github.com/kopia/kopia / createSymlink

Function createSymlink

tools/gettool/autodownload/autodownload.go:46–50  ·  view source on GitHub ↗
(outDir *os.Root, linkPath, linkTarget string)

Source from the content-addressed store, hash-verified

44}
45
46func createSymlink(outDir *os.Root, linkPath, linkTarget string) error {
47 outDir.Remove(linkPath) //nolint:errcheck
48
49 return errors.Wrap(outDir.Symlink(linkTarget, linkPath), "error creating symlink")
50}
51
52func stripLeadingPath(fname string, stripPathComponents int) (string, bool) {
53 if stripPathComponents == 0 {

Callers 1

untarFunction · 0.85

Calls 1

RemoveMethod · 0.65

Tested by

no test coverage detected