MCPcopy
hub / github.com/rclone/rclone / setObject

Method setObject

vfs/file.go:544–554  ·  view source on GitHub ↗

Update the object when written and add it to the directory

(o fs.Object)

Source from the content-addressed store, hash-verified

542
543// Update the object when written and add it to the directory
544func (f *File) setObject(o fs.Object) {
545 f.mu.Lock()
546 f.o = o
547 f._setIsLink()
548 _ = f._applyPendingModTime()
549 d := f.d
550 f.mu.Unlock()
551
552 // Release File.mu before calling Dir method
553 d.addObject(f)
554}
555
556// Update the object but don't update the directory cache - for use by
557// the directory cache

Callers 1

closeMethod · 0.80

Calls 5

_setIsLinkMethod · 0.95
_applyPendingModTimeMethod · 0.95
addObjectMethod · 0.80
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected