Get downloads the directory specified by src into the folder specified by dst. If dst already exists, Get will attempt to update it. src is a URL, whereas dst is always just a file path to a folder. This folder doesn't need to exist. It will be created if it doesn't exist.
(ctx context.Context, dst, src string)
| 102 | // src is a URL, whereas dst is always just a file path to a folder. This |
| 103 | // folder doesn't need to exist. It will be created if it doesn't exist. |
| 104 | func Get(ctx context.Context, dst, src string) (*GetResult, error) { |
| 105 | req := &Request{ |
| 106 | Src: src, |
| 107 | Dst: dst, |
| 108 | GetMode: ModeDir, |
| 109 | } |
| 110 | return DefaultClient.Get(ctx, req) |
| 111 | } |
| 112 | |
| 113 | // GetAny downloads a URL into the given destination. Unlike Get or |
| 114 | // GetFile, both directories and files are supported. |