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

Method bPathForHash

internal/utils/bfs/fs.go:187–194  ·  view source on GitHub ↗
(hash string)

Source from the content-addressed store, hash-verified

185}
186
187func (this *FS) bPathForHash(hash string) (path string, bName string, err error) {
188 err = CheckHashErr(hash)
189 if err != nil {
190 return "", "", err
191 }
192
193 return this.dir + "/" + hash[:2] + "/" + hash[2:4] + BFileExt, hash[:4], nil
194}
195
196func (this *FS) syncLoop() {
197 if this.isClosed {

Callers 2

Calls 1

CheckHashErrFunction · 0.85

Tested by

no test coverage detected