Close writes any data following the last applied fragment and prevents future calls to ApplyFragment.
()
| 65 | // Close writes any data following the last applied fragment and prevents |
| 66 | // future calls to ApplyFragment. |
| 67 | func (a *BinaryApplier) Close() (err error) { |
| 68 | if a.closed { |
| 69 | return nil |
| 70 | } |
| 71 | |
| 72 | a.closed = true |
| 73 | if !a.dirty { |
| 74 | _, err = copyFrom(a.dst, a.src, 0) |
| 75 | } else { |
| 76 | // do nothing, applying a binary fragment copies all data |
| 77 | } |
| 78 | return err |
| 79 | } |
| 80 | |
| 81 | func applyBinaryDeltaFragment(dst io.Writer, src io.ReaderAt, frag []byte) error { |
| 82 | srcSize, delta := readBinaryDeltaSize(frag) |
nothing calls this directly
no test coverage detected