MCPcopy
hub / github.com/google/go-containerregistry / blobHashPath

Method blobHashPath

pkg/registry/blobs_disk.go:34–36  ·  view source on GitHub ↗
(h v1.Hash)

Source from the content-addressed store, hash-verified

32func NewDiskBlobHandler(dir string) BlobHandler { return &diskHandler{dir: dir} }
33
34func (m *diskHandler) blobHashPath(h v1.Hash) string {
35 return filepath.Join(m.dir, h.Algorithm, h.Hex)
36}
37
38func (m *diskHandler) Stat(_ context.Context, _ string, h v1.Hash) (int64, error) {
39 f, err := os.Open(m.blobHashPath(h))

Callers 4

StatMethod · 0.95
GetMethod · 0.95
PutMethod · 0.95
DeleteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected