func (dlr Downloader) Download(req Request) (string, error) {
	if err := os.MkdirAll(req.TargetDir, 0755); err != nil {
		return "", errors.Trace(err)
	}
	dl := dlr.Start(req)
	filename, err := dl.Wait()
	return filename, errors.Trace(err)
}
// Download starts a new download, waits for it to complete, and
// returns the local name of the file. The download can be aborted by
// closing the Abort channel in the Request provided.
Download starts a new download, waits for it to complete, and
returns the local name of the file. The download can be aborted by
closing the Abort channel in the Request provided.
// Download starts a new download waits for it to complete and // returns the local name of the file . The download can be aborted by // closing the Abort channel in the Request provided .
func (dlr Downloader) Download(req Request) (string, error) {
	if err := os.MkdirAll(req.TargetDir, 0755); err != nil {
		return "", errors.Trace(err)
	}
	dl := dlr.Start(req)
	filename, err := dl.Wait()
	return filename, errors.Trace(err)
}
func ( dlr Downloader ) Download ( req Request ) ( string , error ) { if err := os . MkdirAll ( req . TargetDir , 0755 ) ; err != nil { return " " , errors . Trace ( err ) } dl := dlr . Start ( req ) filename , err := dl . Wait ( ) return filename , errors . Trace ( err ) }
Download starts a new download, waits for it to complete, and
returns the local name of the file.
Download starts a new download waits for it to complete and returns the local name of the file .