MCPcopy Create free account
hub / github.com/dgraph-io/dgraph / OpenFile

Method OpenFile

worker/export.go:471–486  ·  view source on GitHub ↗
(fileName string)

Source from the content-addressed store, hash-verified

469}
470
471func (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
488func (l *localExportStorage) FinishWriting(w *Writers) (ExportedFiles, error) {
489 if err := w.DataWriter.Close(); err != nil {

Callers

nothing calls this directly

Calls 2

openMethod · 0.95
InfofMethod · 0.80

Tested by

no test coverage detected