WriteAt writes len(p) bytes from p to the underlying data stream at offset off. It returns the number of bytes written from p (0 <= n <= len(p)) and any error encountered that caused the write to stop early. WriteAt must return a non-nil error if it returns n < len(p). If WriteAt is writing to a de
(p []byte, off int64)
| 119 | // |
| 120 | // Implementations must not retain p. |
| 121 | func (fh *WriteFileHandle) WriteAt(p []byte, off int64) (n int, err error) { |
| 122 | fh.mu.Lock() |
| 123 | defer fh.mu.Unlock() |
| 124 | return fh.writeAt(p, off) |
| 125 | } |
| 126 | |
| 127 | // Implementation of WriteAt - call with lock held |
| 128 | func (fh *WriteFileHandle) writeAt(p []byte, off int64) (n int, err error) { |