Returns the full path to the file written.
(originalPath, newPath string)
| 116 | |
| 117 | // Returns the full path to the file written. |
| 118 | func (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. |
| 127 | func (f *TempDirFixture) ReadFile(path string) string { |