Click or drag to resize

IItemContentDownload 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: 2.0.420.0
Syntax
void Download(
	string filename
)

Parameters

filename
Type: SystemString
Full path of a file to be downloaded to
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...
WebDavSession session = new WebDavSession(license);
session.Credentials = new NetworkCredential("User1", "pwd");

IResource resource = session.OpenResource(new Uri("http://server:8080/Products/image.gif"));
resource.TimeOut = 36000000; // 10 hours
resource.Download("C:\\image.gif");
See Also