]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Add some File method comments
authorMatt Joiner <anacrolix@gmail.com>
Sat, 19 Mar 2016 06:40:30 +0000 (17:40 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Sat, 19 Mar 2016 06:40:30 +0000 (17:40 +1100)
file.go

diff --git a/file.go b/file.go
index 41767e664a0f1b1d197f0d828d441e858911b103..7c8a79bb97e7db06296abc58ec087fab2540a18b 100644 (file)
--- a/file.go
+++ b/file.go
@@ -75,10 +75,13 @@ func (f *File) State() (ret []FilePieceState) {
        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))
 }