MCPcopy Create free account
hub / github.com/couchbase/moss / OnBeforeClose

Method OnBeforeClose

file.go:59–63  ·  view source on GitHub ↗

-------------------------------------------------------- OnBeforeClose registers event callback func's that are invoked before the file is closed.

(cb func())

Source from the content-addressed store, hash-verified

57// OnBeforeClose registers event callback func's that are invoked before the
58// file is closed.
59func (r *FileRef) OnBeforeClose(cb func()) {
60 r.m.Lock()
61 r.beforeCloseCallbacks = append(r.beforeCloseCallbacks, cb)
62 r.m.Unlock()
63}
64
65// OnAfterClose registers event callback func's that are invoked after the
66// file is closed.

Callers 1

TestFileRefFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestFileRefFunction · 0.76