4 "github.com/anacrolix/torrent/segments"
7 // Returns the minimum file lengths required for the given extent to exist on disk. Returns false if
8 // the extent is not covered by the files in the index.
9 func minFileLengthsForTorrentExtent(
10 fileSegmentsIndex segments.Index,
12 each func(fileIndex int, length int64) bool,
14 return fileSegmentsIndex.Locate(segments.Extent{
17 }, func(fileIndex int, segmentBounds segments.Extent) bool {
18 return each(fileIndex, segmentBounds.Start+segmentBounds.Length)