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

Method Release

vfs/write.go:265–280  ·  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

263// It isn't called directly from userspace so the error is ignored by
264// the kernel
265func (fh *WriteFileHandle) Release() error {
266 fh.mu.Lock()
267 defer fh.mu.Unlock()
268 if fh.closed {
269 fs.Debugf(fh.remote, "WriteFileHandle.Release nothing to do")
270 return nil
271 }
272 fs.Debugf(fh.remote, "WriteFileHandle.Release closing")
273 err := fh.close()
274 if err != nil {
275 fs.Errorf(fh.remote, "WriteFileHandle.Release error: %v", err)
276 //} else {
277 // fs.Debugf(fh.remote, "WriteFileHandle.Release OK")
278 }
279 return err
280}
281
282// Stat returns info about the file
283func (fh *WriteFileHandle) Stat() (os.FileInfo, error) {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected