aboutsummaryrefslogtreecommitdiff
path: root/meta/file.go
blob: 2ec14cb2cf1d44ea2b794034836ae03a927ace3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
package meta

import "path"

type File struct {
	Length int      `bencode:"length"`
	MD5Sum []byte   `bencode:"md5sum,optional"` // never seen in wildlife
	Path   []string `bencode:"path"`
}

func (f File) Name() string {
	return path.Join(f.Path...)
}