MCPcopy
hub / github.com/rclone/rclone / updateSize

Method updateSize

vfs/read_write.go:140–147  ·  view source on GitHub ↗

updateSize updates the size of the file if necessary Must be called with fh.mu held

()

Source from the content-addressed store, hash-verified

138//
139// Must be called with fh.mu held
140func (fh *RWFileHandle) updateSize() {
141 // If read only or not opened then ignore
142 if fh.readOnly() || !fh.opened {
143 return
144 }
145 size := fh._size()
146 fh.file.setSize(size)
147}
148
149// close the file handle returning EBADF if it has been
150// closed already.

Callers 2

closeMethod · 0.95
FlushMethod · 0.95

Calls 3

readOnlyMethod · 0.95
_sizeMethod · 0.95
setSizeMethod · 0.80

Tested by

no test coverage detected