MCPcopy
hub / github.com/containerd/containerd / createRegularFile

Function createRegularFile

integration/container_volume_test.go:32–42  ·  view source on GitHub ↗
(basePath, content string)

Source from the content-addressed store, hash-verified

30)
31
32func createRegularFile(basePath, content string) (string, error) {
33 newFolder := filepath.Join(basePath, "regular")
34 err := os.Mkdir(newFolder, 0755)
35 if err != nil {
36 return "", err
37 }
38
39 newFile := filepath.Join(newFolder, "foo.txt")
40 err = os.WriteFile(newFile, []byte(content), 0644)
41 return filepath.Join("regular", "foo.txt"), err
42}
43
44func fileInSymlinkedFolder(basePath, targetFile string) (string, error) {
45 symlinkFolder := filepath.Join(basePath, "symlink_folder")

Callers 1

Calls 1

WriteFileMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…