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

Method hasFullDisk

internal/caches/storage_file.go:1628–1642  ·  view source on GitHub ↗

检查是否有已满的磁盘分区

()

Source from the content-addressed store, hash-verified

1626
1627// 检查是否有已满的磁盘分区
1628func (this *FileStorage) hasFullDisk() bool {
1629 this.checkDiskSpace()
1630
1631 var hasFullDisk = this.mainDiskIsFull
1632 if !hasFullDisk {
1633 var subDirs = this.subDirs // copy slice
1634 for _, subDir := range subDirs {
1635 if subDir.IsFull {
1636 hasFullDisk = true
1637 break
1638 }
1639 }
1640 }
1641 return hasFullDisk
1642}
1643
1644// 获取目录
1645func (this *FileStorage) subDir(hash string) (dirPath string, dirIsFull bool) {

Callers 1

purgeLoopMethod · 0.95

Calls 1

checkDiskSpaceMethod · 0.95

Tested by

no test coverage detected