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

Function newLocalExportStorage

worker/export.go:458–469  ·  view source on GitHub ↗
(destination, backupName string)

Source from the content-addressed store, hash-verified

456}
457
458func newLocalExportStorage(destination, backupName string) (*localExportStorage, error) {
459 bdir, err := filepath.Abs(filepath.Join(destination, backupName))
460 if err != nil {
461 return nil, err
462 }
463
464 if err = os.MkdirAll(bdir, 0700); err != nil {
465 return nil, err
466 }
467
468 return &localExportStorage{destination, backupName}, nil
469}
470
471func (l *localExportStorage) OpenFile(fileName string) (*ExportWriter, error) {
472 fw := &ExportWriter{relativePath: filepath.Join(l.relativePath, fileName)}

Callers 2

newRemoteExportStorageFunction · 0.85
NewExportStorageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…