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

Method OnAfterClose

file.go:67–71  ·  view source on GitHub ↗

OnAfterClose registers event callback func's that are invoked after the file is closed.

(cb func())

Source from the content-addressed store, hash-verified

65// OnAfterClose registers event callback func's that are invoked after the
66// file is closed.
67func (r *FileRef) OnAfterClose(cb func()) {
68 r.m.Lock()
69 r.afterCloseCallbacks = append(r.afterCloseCallbacks, cb)
70 r.m.Unlock()
71}
72
73// AddRef increases the ref-count on the file ref.
74func (r *FileRef) AddRef() File {

Callers 2

TestFileRefFunction · 0.95
removeFileOnCloseMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestFileRefFunction · 0.76