MCPcopy Create free account
hub / github.com/Azure/peerd / PutSize

Method PutSize

pkg/cache/filecache.go:135–140  ·  view source on GitHub ↗

PutSize puts the length of the file.

(name string, len int64)

Source from the content-addressed store, hash-verified

133
134// PutSize puts the length of the file.
135func (c *fileCache) PutSize(name string, len int64) bool {
136 key := filepath.Join(name, "metainfo")
137 c.metadataCache.Set(key, len)
138 c.log.Debug().Str("key", key).Int64("len", len).Msg("put len")
139 return true
140}
141
142func (c *fileCache) getKey(name string, offset int64) string {
143 return filepath.Join(c.path, name, strconv.FormatInt(offset, 10))

Callers

nothing calls this directly

Calls 1

SetMethod · 0.80

Tested by

no test coverage detected