| 469 | } |
| 470 | |
| 471 | func (l *localExportStorage) OpenFile(fileName string) (*ExportWriter, error) { |
| 472 | fw := &ExportWriter{relativePath: filepath.Join(l.relativePath, fileName)} |
| 473 | |
| 474 | filePath, err := filepath.Abs(filepath.Join(l.destination, fw.relativePath)) |
| 475 | if err != nil { |
| 476 | return nil, err |
| 477 | } |
| 478 | |
| 479 | glog.Infof("Exporting to file at %s\n", filePath) |
| 480 | |
| 481 | if err := fw.open(filePath); err != nil { |
| 482 | return nil, err |
| 483 | } |
| 484 | |
| 485 | return fw, nil |
| 486 | } |
| 487 | |
| 488 | func (l *localExportStorage) FinishWriting(w *Writers) (ExportedFiles, error) { |
| 489 | if err := w.DataWriter.Close(); err != nil { |