MCPcopy Create free account
hub / github.com/DNAProject/DNA / GenExportBlocksFileName

Function GenExportBlocksFileName

cmd/utils/utils.go:118–135  ·  view source on GitHub ↗
(name string, start, end uint32)

Source from the content-addressed store, hash-verified

116}
117
118func GenExportBlocksFileName(name string, start, end uint32) string {
119 index := strings.LastIndex(name, ".")
120 fileName := ""
121 fileExt := ""
122 if index < 0 {
123 fileName = name
124 } else {
125 fileName = name[0:index]
126 if index < len(name)-1 {
127 fileExt = name[index+1:]
128 }
129 }
130 fileName = fmt.Sprintf("%s_%d_%d", fileName, start, end)
131 if index > 0 {
132 fileName = fileName + "." + fileExt
133 }
134 return fileName
135}

Callers 2

exportBlocksFunction · 0.92

Calls

no outgoing calls

Tested by 1