()
| 281 | } |
| 282 | |
| 283 | func (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 检查是否可以关闭 |
| 298 | func (this *BlocksFile) CanClose() bool { |