MCPcopy Index your code
hub / github.com/rclone/rclone / Release

Method Release

vfs/read_write.go:204–217  ·  view source on GitHub ↗

Release is called when we are finished with the file handle It isn't called directly from userspace so the error is ignored by the kernel

()

Source from the content-addressed store, hash-verified

202// It isn't called directly from userspace so the error is ignored by
203// the kernel
204func (fh *RWFileHandle) Release() error {
205 fh.mu.Lock()
206 defer fh.mu.Unlock()
207 fs.Debugf(fh.logPrefix(), "RWFileHandle.Release")
208 if fh.closed {
209 // Don't return an error if called twice
210 return nil
211 }
212 err := fh.close()
213 if err != nil {
214 fs.Errorf(fh.logPrefix(), "RWFileHandle.Release error: %v", err)
215 }
216 return err
217}
218
219// _size returns the size of the underlying file and also sets it in
220// the owning file

Callers

nothing calls this directly

Calls 6

logPrefixMethod · 0.95
closeMethod · 0.95
DebugfFunction · 0.92
ErrorfFunction · 0.92
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected