VerifyAllData checks and returns whether all data and parity files contain correct data. Note that this is worth calling only when there are no unusable data or parity files, since if there are, then false is guaranteed to be returned for ok.
()
| 366 | // there are no unusable data or parity files, since if there are, |
| 367 | // then false is guaranteed to be returned for ok. |
| 368 | func (d *Decoder) VerifyAllData() (ok bool, err error) { |
| 369 | rs, err := d.newReedSolomon() |
| 370 | if err != nil { |
| 371 | return false, err |
| 372 | } |
| 373 | |
| 374 | shards := d.buildShards() |
| 375 | |
| 376 | return rs.Verify(shards) |
| 377 | } |
| 378 | |
| 379 | // Repair tries to repair any missing or corrupt data, using the |
| 380 | // parity volumes. Returns a list of paths to files that were |