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

Method hashPath

internal/caches/storage_file.go:1016–1024  ·  view source on GitHub ↗

获取Hash对应的文件路径

(hash string)

Source from the content-addressed store, hash-verified

1014
1015// 获取Hash对应的文件路径
1016func (this *FileStorage) hashPath(hash string) (path string, diskIsFull bool) {
1017 if len(hash) != HashKeyLength {
1018 return "", false
1019 }
1020 var dir string
1021 dir, diskIsFull = this.subDir(hash)
1022 path = dir + "/" + hash + ".cache"
1023 return
1024}
1025
1026// 初始化List
1027func (this *FileStorage) initList() error {

Callers 1

purgeLoopMethod · 0.95

Calls 1

subDirMethod · 0.95

Tested by

no test coverage detected