]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Rename File.PrioritizeRegion to DownloadRegion
authorMatt Joiner <anacrolix@gmail.com>
Sat, 6 Jan 2018 05:54:17 +0000 (16:54 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 6 Jan 2018 05:54:17 +0000 (16:54 +1100)
Fixes #223

file.go

diff --git a/file.go b/file.go
index e71cee6cde8bc3e24f7ae91df1206e505507e05c..8c5ac6d79e69320b7041b1babb27a59893052c9d 100644 (file)
--- a/file.go
+++ b/file.go
@@ -81,9 +81,14 @@ func (f *File) Download() {
        f.t.DownloadPieces(f.t.byteRegionPieces(f.offset, f.length))
 }
 
+// Deprecated: Use File.DownloadRegion.
+func (f *File) PrioritizeRegion(off, len int64) {
+       f.DownloadRegion(off, len)
+}
+
 // Requests that torrent pieces containing bytes in the given region of the
 // file be downloaded.
-func (f *File) PrioritizeRegion(off, len int64) {
+func (f *File) DownloadRegion(off, len int64) {
        f.t.DownloadPieces(f.t.byteRegionPieces(f.offset+off, len))
 }