MCPcopy Index your code
hub / github.com/kopia/kopia / run

Method run

cli/command_cache_prefetch.go:26–43  ·  view source on GitHub ↗
(ctx context.Context, rep repo.DirectRepositoryWriter)

Source from the content-addressed store, hash-verified

24}
25
26func (c *commandCachePrefetch) run(ctx context.Context, rep repo.DirectRepositoryWriter) error {
27 var oids []object.ID
28
29 for _, s := range c.objectIDs {
30 oid, err := snapshotfs.ParseObjectIDWithPath(ctx, rep, s)
31 if err != nil {
32 return errors.Wrapf(err, "unable to parse ID: %v", s)
33 }
34
35 oids = append(oids, oid)
36 }
37
38 cids, err := rep.PrefetchObjects(ctx, oids, c.hint)
39
40 log(ctx).Infof("prefetched %v contents", len(cids))
41
42 return errors.Wrap(err, "error prefetching")
43}

Callers

nothing calls this directly

Calls 2

ParseObjectIDWithPathFunction · 0.92
PrefetchObjectsMethod · 0.65

Tested by

no test coverage detected