Click or drag to resize

IItemContentDownloadAsync Method

IT Hit WebDAV Classes Reference
Downloads content of the file to a file specified by filename.

Namespace:  ITHit.WebDAV.Client
Assembly:  ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll) Version: 6.0.4052-Beta
Syntax
Task DownloadAsync(
	string filename
)

Parameters

filename
Type: SystemString
Full path of a file to be downloaded to

Return Value

Type: Task

[Missing <returns> documentation for "M:ITHit.WebDAV.Client.IItemContent.DownloadAsync(System.String)"]

Exceptions
ExceptionCondition
NotFoundExceptionThis resource doesn't exist on the server.
WebDavHttpExceptionServer returned unknown error.
WebDavExceptionUnexpected error occurred.
IOExceptionAn I/O error occurs.
ArgumentOutOfRangeExceptionFile is empty.
Examples
In the following example a file is downloaded from a WebDAV server to local file system.
string license = "<?xml version='1.0' encoding='utf...
WebDavSessionAsync session = new WebDavSessionAsync(license);
session.Credentials = new NetworkCredential("User1", "pwd");

IFile davFile = await session.GetFileAsync(new Uri("https://server:8080/Products/image.gif"));
await davFile.DownloadAsync("C:\\image.gif");
See Also