file.go | 3 +++ diff --git a/file.go b/file.go index 41767e664a0f1b1d197f0d828d441e858911b103..7c8a79bb97e7db06296abc58ec087fab2540a18b 100644 --- a/file.go +++ b/file.go @@ -75,10 +75,13 @@ } return } +// Requests that all pieces containing data in the file be downloaded. func (f *File) Download() { f.t.DownloadPieces(f.t.torrent.byteRegionPieces(f.offset, f.length)) } +// Requests that torrent pieces containing bytes in the given region of the +// file be downloaded. func (f *File) PrioritizeRegion(off, len int64) { f.t.DownloadPieces(f.t.torrent.byteRegionPieces(f.offset+off, len)) }