This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.Curl.
Summary
Downloads the file from the specified remote URL.
- Assembly
- Cake
.Curl .dll - Namespace
- Cake
.Curl - Containing Type
- CurlAliases
Syntax
public static void CurlDownloadFile(this ICakeContext context, Uri host, CurlDownloadSettings settings)
Examples
CurlDownloadFile(new Uri("http://host/file"), new CurlDownloadSettings
{
OutputPaths = new FilePath[] { "output/path" }
});
Remarks
By default, curl is going to download the file to the working directory
using the same name as on the remote host.
If you want to put the file into a different directory, you can set the
CurlDownloadSettings.WorkingDirectory
property accordingly.
If you want to rename the downloaded file, you can do so by specifying the
output path for the file at the remote URL in the
CurlDownloadSettings.OutputPaths
property.
Attributes
Type | Description |
---|---|
Cake |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | The Cake context. |
host | Uri | The URL of the file to download. |
settings | CurlDownloadSettings | The settings. |
Return Value
Type | Description |
---|---|
void |