MCPcopy Create free account
hub / github.com/coder/envbuilder / moveLibSymlinks

Function moveLibSymlinks

internal/ebutil/libs.go:77–86  ·  view source on GitHub ↗

moveLibSymlinks moves a list of symlinks from source to destination directory.

(m mounter, symlinks []string, srcDir, destDir string)

Source from the content-addressed store, hash-verified

75
76// moveLibSymlinks moves a list of symlinks from source to destination directory.
77func moveLibSymlinks(m mounter, symlinks []string, srcDir, destDir string) error {
78 for _, l := range symlinks {
79 oldpath := filepath.Join(srcDir, l)
80 newpath := filepath.Join(destDir, l)
81 if err := m.Rename(oldpath, newpath); err != nil {
82 return fmt.Errorf("move symlink %s => %s: %w", oldpath, newpath, err)
83 }
84 }
85 return nil
86}

Callers 1

remountFunction · 0.85

Calls 2

JoinMethod · 0.80
RenameMethod · 0.65

Tested by

no test coverage detected