MCPcopy Create free account
hub / github.com/rclone/rclone / WriteAt

Method WriteAt

vfs/write.go:121–125  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

119//
120// Implementations must not retain p.
121func (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
128func (fh *WriteFileHandle) writeAt(p []byte, off int64) (n int, err error) {

Callers

nothing calls this directly

Calls 3

writeAtMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected