MCPcopy
hub / github.com/containerd/containerd / IsUnpacked

Method IsUnpacked

client/image.go:208–227  ·  view source on GitHub ↗
(ctx context.Context, snapshotterName string)

Source from the content-addressed store, hash-verified

206}
207
208func (i *image) IsUnpacked(ctx context.Context, snapshotterName string) (bool, error) {
209 sn, err := i.client.getSnapshotter(ctx, snapshotterName)
210 if err != nil {
211 return false, err
212 }
213
214 diffs, err := i.RootFS(ctx)
215 if err != nil {
216 return false, err
217 }
218
219 if _, err := sn.Stat(ctx, identity.ChainID(diffs).String()); err != nil {
220 if errdefs.IsNotFound(err) {
221 return false, nil
222 }
223 return false, err
224 }
225
226 return true, nil
227}
228
229func (i *image) Spec(ctx context.Context) (ocispec.Image, error) {
230 var ociImage ocispec.Image

Callers

nothing calls this directly

Calls 4

RootFSMethod · 0.95
StatMethod · 0.65
getSnapshotterMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected