MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / RemoveAll

Method RemoveAll

internal/utils/bfs/blocks_file.go:283–295  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

281}
282
283func (this *BlocksFile) RemoveAll() error {
284 this.mu.Lock()
285 defer this.mu.Unlock()
286
287 this.isClosed = true
288
289 _ = this.mFile.RemoveAll()
290
291 this.closeReaderPool()
292
293 _ = this.fp.Close()
294 return os.Remove(this.fp.Name())
295}
296
297// CanClose 检查是否可以关闭
298func (this *BlocksFile) CanClose() bool {

Callers

nothing calls this directly

Calls 6

closeReaderPoolMethod · 0.95
CloseMethod · 0.65
RemoveMethod · 0.65
NameMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected