Add method File.Torrent
This commit is contained in:
parent
1a01ea87df
commit
55cae072f5
4
file.go
4
file.go
|
@ -15,6 +15,10 @@ type File struct {
|
||||||
fi metainfo.FileInfo
|
fi metainfo.FileInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f *File) Torrent() Torrent {
|
||||||
|
return f.t
|
||||||
|
}
|
||||||
|
|
||||||
// Data for this file begins this far into the torrent.
|
// Data for this file begins this far into the torrent.
|
||||||
func (f *File) Offset() int64 {
|
func (f *File) Offset() int64 {
|
||||||
return f.offset
|
return f.offset
|
||||||
|
|
Loading…
Reference in New Issue