MCPcopy
hub / github.com/kopia/kopia / findRelativePathParts

Function findRelativePathParts

cli/command_snapshot_list.go:89–104  ·  view source on GitHub ↗
(m *snapshot.Manifest, path string)

Source from the content-addressed store, hash-verified

87}
88
89func findRelativePathParts(m *snapshot.Manifest, path string) ([]string, error) {
90 if path == "" {
91 return nil, nil
92 }
93
94 relPath, err := filepath.Rel(m.Source.Path, path)
95 if err != nil {
96 return nil, err //nolint:wrapcheck
97 }
98
99 if relPath == "." {
100 return nil, nil
101 }
102
103 return strings.Split(filepath.ToSlash(relPath), "/"), nil
104}
105
106func findManifestIDs(ctx context.Context, rep repo.Repository, source string, tags map[string]string) ([]manifest.ID, string, error) {
107 if source == "" {

Callers 2

outputManifestGroupsMethod · 0.85
findLastManifestWithPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected