MCPcopy Create free account
hub / github.com/containerd/nerdctl / WriteFile

Method WriteFile

pkg/testutil/compose.go:39–44  ·  view source on GitHub ↗
(name, content string)

Source from the content-addressed store, hash-verified

37}
38
39func (cd *ComposeDir) WriteFile(name, content string) {
40 if err := filesystem.WriteFile(filepath.Join(cd.dir, name), []byte(content), 0644); err != nil {
41 cd.t.Log(fmt.Sprintf("Failed to create file %v", err))
42 cd.t.FailNow()
43 }
44}
45
46func (cd *ComposeDir) YAMLFullPath() string {
47 return filepath.Join(cd.dir, cd.yamlBasePath)

Callers 15

NewComposeDirFunction · 0.95
TestIPFSCompBuildFunction · 0.95
SaveMethod · 0.80
CreateTmpHostsConfigFunction · 0.80
TestBackupFailureFunction · 0.80
TestCopyFromContainerFunction · 0.80
cpTestHelperFunction · 0.80

Calls 3

WriteFileFunction · 0.92
LogMethod · 0.65
FailNowMethod · 0.65

Tested by 15

TestIPFSCompBuildFunction · 0.76
TestBackupFailureFunction · 0.64
TestCopyFromContainerFunction · 0.64
cpTestHelperFunction · 0.64
TestCopyAcidFunction · 0.64
TestRunIpcHostFunction · 0.64