Doc metainfo.Info.BuildFromFilePath
This commit is contained in:
parent
1936054615
commit
bdf36c09cf
@ -54,6 +54,8 @@ type Info struct {
|
||||
Files []FileInfo `bencode:"files,omitempty"`
|
||||
}
|
||||
|
||||
// This is a helper that sets Files and Pieces from a root path and its
|
||||
// children.
|
||||
func (info *Info) BuildFromFilePath(root string) (err error) {
|
||||
info.Name = filepath.Base(root)
|
||||
info.Files = nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user