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

Method GetDataFile

file_manager.go:34–36  ·  view source on GitHub ↗

GetDataFile will return a DataFile Object

(path string, capacity int64)

Source from the content-addressed store, hash-verified

32
33// GetDataFile will return a DataFile Object
34func (fm *FileManager) GetDataFile(path string, capacity int64) (datafile *DataFile, err error) {
35 return fm.getDataFileWithMode(path, capacity, false)
36}
37
38// GetDataFileReadOnly will return a DataFile Object for read-only operations
39// This method skips file truncation to improve read performance

Callers 12

GetDataFileByIDMethod · 0.95
TestDataFile_ErrFunction · 0.95
TestDataFile1Function · 0.95
TestDataFile2Function · 0.95
TestDataFile_ReadRecordFunction · 0.95
TestDataFile_Err_PathFunction · 0.95
TestDataFile_Crc_ErrFunction · 0.95
TestFileManager1Function · 0.95
prepareMethod · 0.80
rotateActiveFileMethod · 0.80
mergeLegacyMethod · 0.80
setActiveFileMethod · 0.80

Calls 1

getDataFileWithModeMethod · 0.95

Tested by 7

TestDataFile_ErrFunction · 0.76
TestDataFile1Function · 0.76
TestDataFile2Function · 0.76
TestDataFile_ReadRecordFunction · 0.76
TestDataFile_Err_PathFunction · 0.76
TestDataFile_Crc_ErrFunction · 0.76
TestFileManager1Function · 0.76