FetchRefCount fetches the ref-count on the file ref.
()
| 124 | |
| 125 | // FetchRefCount fetches the ref-count on the file ref. |
| 126 | func (r *FileRef) FetchRefCount() int { |
| 127 | if r == nil { |
| 128 | return 0 |
| 129 | } |
| 130 | |
| 131 | r.m.Lock() |
| 132 | ref := r.refs |
| 133 | r.m.Unlock() |
| 134 | |
| 135 | return ref |
| 136 | } |
| 137 | |
| 138 | // -------------------------------------------------------- |
| 139 |