(dst, src *bufWriter)
| 230 | } |
| 231 | |
| 232 | func copyFile(dst, src *bufWriter) { |
| 233 | dst.flush() |
| 234 | _, err := io.Copy(dst.file, src.finish()) |
| 235 | if err != nil { |
| 236 | log.Fatalf("copying %s to %s: %v", src.name, dst.name, err) |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | // addName adds the file with the given name to the index. |
| 241 | // It returns the assigned file ID number. |