MCPcopy
hub / github.com/rclone/rclone / Write

Method Write

vfs/read_write.go:376–382  ·  view source on GitHub ↗

Write bytes to the file

(b []byte)

Source from the content-addressed store, hash-verified

374
375// Write bytes to the file
376func (fh *RWFileHandle) Write(b []byte) (n int, err error) {
377 fh.mu.Lock()
378 defer fh.mu.Unlock()
379 n, err = fh._writeAt(b, fh.offset, false)
380 fh.offset += int64(n)
381 return n, err
382}
383
384// WriteString a string to the file
385func (fh *RWFileHandle) WriteString(s string) (n int, err error) {

Callers 1

WriteStringMethod · 0.95

Calls 3

_writeAtMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected