MCPcopy
hub / github.com/kopia/kopia / NewComparer

Function NewComparer

internal/diff/diff.go:404–411  ·  view source on GitHub ↗

NewComparer creates a comparer for a given repository that will output the results to a given writer.

(out io.Writer, statsOnly bool)

Source from the content-addressed store, hash-verified

402
403// NewComparer creates a comparer for a given repository that will output the results to a given writer.
404func NewComparer(out io.Writer, statsOnly bool) (*Comparer, error) {
405 tmp, err := os.MkdirTemp("", "kopia")
406 if err != nil {
407 return nil, errors.Wrap(err, "error creating temp directory")
408 }
409
410 return &Comparer{out: out, tmpDir: tmp, statsOnly: statsOnly}, nil
411}
412
413// GetPrecedingSnapshot fetches the snapshot manifest for the snapshot immediately preceding the given snapshotID if it exists.
414func GetPrecedingSnapshot(ctx context.Context, rep repo.Repository, snapshotID string) (*snapshot.Manifest, error) {

Calls

no outgoing calls