5 // Information specific to a single file inside the MetaInfo structure.
7 Length int64 `bencode:"length"` // BEP3
8 Path []string `bencode:"path"` // BEP3
9 PathUtf8 []string `bencode:"path.utf-8,omitempty"`
12 func (fi *FileInfo) DisplayPath(info *Info) string {
14 return strings.Join(fi.BestPath(), "/")
16 return info.BestName()
20 func (me FileInfo) Offset(info *Info) (ret int64) {
21 for _, fi := range info.UpvertedFiles() {
22 if me.DisplayPath(info) == fi.DisplayPath(info) {
30 func (fi FileInfo) BestPath() []string {
31 if len(fi.PathUtf8) != 0 {