From 125c864a8cdc5bec0b3ab2c36c2f46cca4476f23 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sat, 19 Mar 2016 17:40:30 +1100 Subject: [PATCH] Add some File method comments --- file.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/file.go b/file.go index 41767e66..7c8a79bb 100644 --- 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)) } -- 2.48.1