MCPcopy
hub / github.com/syncthing/syncthing / compareDirectoryContents

Function compareDirectoryContents

test/util.go:384–395  ·  view source on GitHub ↗
(actual, expected []fileInfo)

Source from the content-addressed store, hash-verified

382}
383
384func compareDirectoryContents(actual, expected []fileInfo) error {
385 if len(actual) != len(expected) {
386 return fmt.Errorf("len(actual) = %d; len(expected) = %d", len(actual), len(expected))
387 }
388
389 for i := range actual {
390 if actual[i] != expected[i] {
391 return fmt.Errorf("mismatch; actual %#v != expected %#v", actual[i], expected[i])
392 }
393 }
394 return nil
395}
396
397type fileInfo struct {
398 name string

Callers 4

benchmarkTransferFunction · 0.85
TestConflictsDefaultFunction · 0.85
TestOverrideFunction · 0.85
scSyncAndCompareFunction · 0.85

Calls

no outgoing calls

Tested by 4

benchmarkTransferFunction · 0.68
TestConflictsDefaultFunction · 0.68
TestOverrideFunction · 0.68
scSyncAndCompareFunction · 0.68