HttpAliases.

DownloadFile(ICakeContext, string, FilePath) Method

Summary

Downloads the specified resource over HTTP to the specified output path.
Namespace
Cake.Common.Net
Containing Type
HttpAliases

Syntax

[CakeMethodAlias]
[CakeAliasCategory("Download")]
public static void DownloadFile(this ICakeContext context, string address, FilePath outputPath)

Examples

var outputPath = File("./index.html");
DownloadFile("http://www.example.org/index.html", outputPath);

Attributes

Type Description
CakeMethodAliasAttribute An attribute used to mark script method aliases.
CakeAliasCategoryAttribute An attribute used for documentation of alias methods/properties.

Parameters

Name Type Description
context ICakeContext The context.
address string The URL of the resource to download.
outputPath FilePath The output path.

Return Value

Type Description
void