MCPcopy
hub / github.com/kopia/kopia / parseNestedObjectID

Function parseNestedObjectID

snapshot/snapshotfs/objref.go:64–76  ·  view source on GitHub ↗
(ctx context.Context, startingDir fs.Entry, parts []string)

Source from the content-addressed store, hash-verified

62}
63
64func parseNestedObjectID(ctx context.Context, startingDir fs.Entry, parts []string) (object.ID, error) {
65 e, err := GetNestedEntry(ctx, startingDir, parts)
66 if err != nil {
67 return object.EmptyID, err
68 }
69
70 hoid, ok := e.(object.HasObjectID)
71 if !ok {
72 return object.EmptyID, errors.New("entry without ObjectID")
73 }
74
75 return hoid.ObjectID(), nil
76}
77
78// FindSnapshotByRootObjectIDOrManifestID returns the list of matching snapshots for a given rootID.
79// which can be either snapshot manifest ID (which matches 0 or 1 snapshots)

Callers 1

ParseObjectIDWithPathFunction · 0.85

Calls 2

GetNestedEntryFunction · 0.85
ObjectIDMethod · 0.65

Tested by

no test coverage detected