MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / Create

Method Create

hintfile.go:417–427  ·  view source on GitHub ↗

Create creates a hint file for writing

(path string)

Source from the content-addressed store, hash-verified

415
416// Create creates a hint file for writing
417func (w *HintFileWriter) Create(path string) error {
418 file, err := os.Create(path)
419 if err != nil {
420 return err
421 }
422
423 w.file = file
424 w.writer = bufio.NewWriter(file)
425
426 return nil
427}
428
429// Write writes a hint entry to the file
430func (w *HintFileWriter) Write(entry *HintEntry) error {

Callers 14

newOutputMethod · 0.95
BenchmarkHintFileWriteFunction · 0.95
BenchmarkHintFileReadFunction · 0.95
TestHintFileWriterReaderFunction · 0.95
TestHintFilePartialReadFunction · 0.95
TestEnumerateDataFileIDsFunction · 0.45
TestPurgeMergeFilesFunction · 0.45

Calls

no outgoing calls

Tested by 12

BenchmarkHintFileWriteFunction · 0.76
BenchmarkHintFileReadFunction · 0.76
TestHintFileWriterReaderFunction · 0.76
TestHintFilePartialReadFunction · 0.76
TestEnumerateDataFileIDsFunction · 0.36
TestPurgeMergeFilesFunction · 0.36
TestDB_BackupTarGZFunction · 0.36
TestTarGZCompressFunction · 0.36