MCPcopy
hub / github.com/kopia/kopia / contentShow

Method contentShow

cli/command_content_show.go:47–54  ·  view source on GitHub ↗
(ctx context.Context, r repo.DirectRepository, contentID content.ID)

Source from the content-addressed store, hash-verified

45}
46
47func (c *commandContentShow) contentShow(ctx context.Context, r repo.DirectRepository, contentID content.ID) error {
48 data, err := r.ContentReader().GetContent(ctx, contentID)
49 if err != nil {
50 return errors.Wrapf(err, "error getting content %v", contentID)
51 }
52
53 return showContentWithFlags(c.out.stdout(), bytes.NewReader(data), c.decompress, c.indentJSON)
54}

Callers 1

runMethod · 0.95

Calls 4

showContentWithFlagsFunction · 0.85
GetContentMethod · 0.65
ContentReaderMethod · 0.65
stdoutMethod · 0.65

Tested by

no test coverage detected