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

Method GetDataFileReadOnly

file_manager.go:40–42  ·  view source on GitHub ↗

GetDataFileReadOnly will return a DataFile Object for read-only operations This method skips file truncation to improve read performance

(path string, capacity int64)

Source from the content-addressed store, hash-verified

38// GetDataFileReadOnly will return a DataFile Object for read-only operations
39// This method skips file truncation to improve read performance
40func (fm *FileManager) GetDataFileReadOnly(path string, capacity int64) (datafile *DataFile, err error) {
41 return fm.getDataFileWithMode(path, capacity, true)
42}
43
44// getDataFileWithMode will return a DataFile Object with specified read-only mode
45func (fm *FileManager) getDataFileWithMode(path string, capacity int64, readOnly bool) (datafile *DataFile, err error) {

Callers 1

getValueByRecordMethod · 0.80

Calls 1

getDataFileWithModeMethod · 0.95

Tested by

no test coverage detected