MCPcopy Index your code
hub / github.com/containerd/containerd / copyShim

Function copyShim

integration/client/container_test.go:186–201  ·  view source on GitHub ↗
(shimPath string)

Source from the content-addressed store, hash-verified

184}
185
186func copyShim(shimPath string) (string, error) {
187 tempPath := filepath.Join(os.TempDir(), filepath.Base(shimPath))
188 if err := fs.CopyFile(tempPath, shimPath); err != nil {
189 return "", err
190 }
191
192 fi, err := os.Stat(shimPath)
193 if err != nil {
194 return "", err
195 }
196 if err := os.Chmod(tempPath, fi.Mode().Perm()); err != nil {
197 return "", err
198 }
199
200 return tempPath, nil
201}
202
203func TestContainerStartWithAbsRuntimePath(t *testing.T) {
204 t.Parallel()

Callers 1

Calls 3

CopyFileMethod · 0.65
StatMethod · 0.65
ModeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…