获取Hash对应的文件路径
(hash string)
| 1014 | |
| 1015 | // 获取Hash对应的文件路径 |
| 1016 | func (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 |
| 1027 | func (this *FileStorage) initList() error { |