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

Method dumpIndexBlobEntries

cli/command_index_inspect.go:107–125  ·  view source on GitHub ↗
(entries chan indexBlobPlusContentInfo)

Source from the content-addressed store, hash-verified

105}
106
107func (c *commandIndexInspect) dumpIndexBlobEntries(entries chan indexBlobPlusContentInfo) {
108 for ent := range entries {
109 if !c.shouldInclude(ent.contentInfo) {
110 continue
111 }
112
113 ci := ent.contentInfo
114 bm := ent.indexBlob
115
116 state := "created"
117 if ci.Deleted {
118 state = "deleted"
119 }
120
121 c.out.printStdout("%v %v %v %v %v %v %v %v\n",
122 formatTimestampPrecise(bm.Timestamp), bm.BlobID,
123 ci.ContentID, state, formatTimestampPrecise(ci.Timestamp()), ci.PackBlobID, ci.PackOffset, ci.PackedLength)
124 }
125}
126
127func (c *commandIndexInspect) shouldInclude(ci content.Info) bool {
128 if len(c.contentIDs) == 0 {

Callers 1

runMethod · 0.95

Calls 4

shouldIncludeMethod · 0.95
formatTimestampPreciseFunction · 0.85
printStdoutMethod · 0.80
TimestampMethod · 0.80

Tested by

no test coverage detected