CurlAliases.

CurlDownloadFiles(ICakeContext, IEnumerable<Uri>, CurlDownloadSettings) Method

Summary

Downloads the files from the specified remote URLs.
Assembly
Cake.Curl.dll
Namespace
Cake.Curl
Containing Type
CurlAliases

Syntax

public static void CurlDownloadFiles(this ICakeContext context, IEnumerable<Uri> hosts, CurlDownloadSettings settings)

Examples

CurlDownloadFiles(
    new Uri[]
    {
        new Uri("http://host/file"),
        new Uri("http://host/anotherfile")
    },
    new CurlDownloadSettings
    {
        OutputPaths = new FilePath[]
        {
            "output/path",
            "another/output/path"
        }
    });

Remarks

By default, curl is going to download the files to the working directory using the same names as on the remote host. If you want to put the files into a different directory, you can set the CurlDownloadSettings.WorkingDirectory property accordingly. If you want to rename the downloaded files, you can do so by specifying the output paths for each of the files at the remote URLs in the CurlDownloadSettings.OutputPaths property. In that case, the order of the output paths is going to be matched with the order of the remote URLs.

Attributes

Type Description
CakeMethodAliasAttribute

Parameters

Name Type Description
context ICakeContext The Cake context.
hosts IEnumerable<Uri> The URLs of the files to download.
settings CurlDownloadSettings The settings.

Return Value

Type Description
void