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

Function getDataPath

utils.go:29–35  ·  view source on GitHub ↗

getDataPath returns the data path for the given file ID.

(fID int64, dir string)

Source from the content-addressed store, hash-verified

27
28// getDataPath returns the data path for the given file ID.
29func getDataPath(fID int64, dir string) string {
30 if IsMergeFile(fID) {
31 seq := GetMergeSeq(fID)
32 return filepath.Join(dir, fmt.Sprintf("merge_%d%s", seq, DataSuffix))
33 }
34 return filepath.Join(dir, strconv2.Int64ToStr(fID)+DataSuffix)
35}
36
37func splitIntStringStr(str, separator string) (int, string) {
38 strList := strings.Split(str, separator)

Callers 14

purgeMergeFilesFunction · 0.85
prepareMethod · 0.85
commitMethod · 0.85
rewriteFileMethod · 0.85
recoverMergeManifestMethod · 0.85
rotateActiveFileMethod · 0.85
mergeLegacyMethod · 0.85
getValueByRecordMethod · 0.85
setActiveFileMethod · 0.85

Calls 2

IsMergeFileFunction · 0.85
GetMergeSeqFunction · 0.85