MCPcopy Create free account
hub / github.com/AdRoll/baker / doSplit

Function doSplit

pkg/splitwriter/split_writer.go:172–185  ·  view source on GitHub ↗
(f *os.File, off int64)

Source from the content-addressed store, hash-verified

170}
171
172func doSplit(f *os.File, off int64) (*os.File, error) {
173 // Find the filename of the next part number
174 dir, fname := filepath.Split(f.Name())
175 next, first, err := nextSplit(fname)
176 if err != nil {
177 return nil, err
178 }
179
180 if first {
181 return doFirstSplit(f, dir, fname, next, off)
182 }
183
184 return doNextSplit(f, dir, next, off)
185}
186
187// doNextSplit splits f at offset off, transfering the data to the next split.
188// It returns the next split.

Callers 1

CloseMethod · 0.85

Calls 3

nextSplitFunction · 0.85
doFirstSplitFunction · 0.85
doNextSplitFunction · 0.85

Tested by

no test coverage detected