]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Add method File.Torrent
authorMatt Joiner <anacrolix@gmail.com>
Wed, 11 Nov 2015 16:25:04 +0000 (03:25 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 11 Nov 2015 16:25:04 +0000 (03:25 +1100)
file.go

diff --git a/file.go b/file.go
index b8550cc7eee9acc355361ee6b1a88763ac466729..cdeb3c70425be9ae4cbfd93005f4f87377e0c5ca 100644 (file)
--- a/file.go
+++ b/file.go
@@ -15,6 +15,10 @@ type File struct {
        fi     metainfo.FileInfo
 }
 
+func (f *File) Torrent() Torrent {
+       return f.t
+}
+
 // Data for this file begins this far into the torrent.
 func (f *File) Offset() int64 {
        return f.offset