Add some File method comments
This commit is contained in:
parent
409d3695a6
commit
125c864a8c
3
file.go
3
file.go
|
@ -75,10 +75,13 @@ func (f *File) State() (ret []FilePieceState) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Requests that all pieces containing data in the file be downloaded.
|
||||||
func (f *File) Download() {
|
func (f *File) Download() {
|
||||||
f.t.DownloadPieces(f.t.torrent.byteRegionPieces(f.offset, f.length))
|
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) {
|
func (f *File) PrioritizeRegion(off, len int64) {
|
||||||
f.t.DownloadPieces(f.t.torrent.byteRegionPieces(f.offset+off, len))
|
f.t.DownloadPieces(f.t.torrent.byteRegionPieces(f.offset+off, len))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue