MCPcopy
hub / github.com/docker/compose / CopyFile

Method CopyFile

pkg/watch/temp_dir_fixture.go:118–124  ·  view source on GitHub ↗

Returns the full path to the file written.

(originalPath, newPath string)

Source from the content-addressed store, hash-verified

116
117// Returns the full path to the file written.
118func (f *TempDirFixture) CopyFile(originalPath, newPath string) {
119 contents, err := os.ReadFile(originalPath)
120 if err != nil {
121 f.t.Fatal(err)
122 }
123 f.WriteFile(newPath, string(contents))
124}
125
126// Read the file.
127func (f *TempDirFixture) ReadFile(path string) string {

Callers

nothing calls this directly

Calls 2

WriteFileMethod · 0.95
ReadFileMethod · 0.80

Tested by

no test coverage detected