(dir string)
| 346 | } |
| 347 | |
| 348 | func directoryContents(dir string) ([]fileInfo, error) { |
| 349 | res := make(chan fileInfo) |
| 350 | errc := startWalker(dir, res, nil) |
| 351 | |
| 352 | var files []fileInfo |
| 353 | for f := range res { |
| 354 | files = append(files, f) |
| 355 | } |
| 356 | |
| 357 | return files, <-errc |
| 358 | } |
| 359 | |
| 360 | func mergeDirectoryContents(c ...[]fileInfo) []fileInfo { |
| 361 | m := make(map[string]fileInfo) |