GetFile downloads the file specified by src into the path specified by dst.
(ctx context.Context, dst, src string)
| 128 | // GetFile downloads the file specified by src into the path specified by |
| 129 | // dst. |
| 130 | func GetFile(ctx context.Context, dst, src string) (*GetResult, error) { |
| 131 | req := &Request{ |
| 132 | Src: src, |
| 133 | Dst: dst, |
| 134 | GetMode: ModeFile, |
| 135 | } |
| 136 | return DefaultClient.Get(ctx, req) |
| 137 | } |
| 138 | |
| 139 | // getRunCommand is a helper that will run a command and capture the output |
| 140 | // in the case an error happens. |