NewComparer creates a comparer for a given repository that will output the results to a given writer.
(out io.Writer, statsOnly bool)
| 402 | |
| 403 | // NewComparer creates a comparer for a given repository that will output the results to a given writer. |
| 404 | func 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. |
| 414 | func GetPrecedingSnapshot(ctx context.Context, rep repo.Repository, snapshotID string) (*snapshot.Manifest, error) { |
no outgoing calls