IItemContent Interface

IT Hit WebDAV for .NET

Provides file upload and download functionality.

For a list of all members of this type, see IItemContent Members.

ITHit.WebDAV.Client.IItemContent
   ITHit.WebDAV.Client.IResource
   ITHit.WebDAV.Client.IVersion

[Visual Basic]
Public Interface IItemContent
[C#]
public interface IItemContent

Remarks

You can use Upload / Download methods fo upload and download files to file system and GetWriteStream / GetReadStream to upload and download files stored in a database or any other storage.

Example

The following example demonstrates how to upload a file from local file system to a WebDAV server.

                
string license = "<?xml version='1.0' encoding='utf...
WebDavSession session = new WebDavSession(license);
session.Credentials = new NetworkCredential("User1", "pwd");
IFolder folder = session.OpenFolder(new Uri("http://server:8080/Sales"));

IResource resource = folder.CreateResource("products.xlsx");
resource.AllowWriteStreamBuffering = false;
resource.TimeOut = 36000000; // 10 hours
resource.Upload("C:\\products.xlsx");
                
            
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");
                
            

Requirements

Namespace: ITHit.WebDAV.Client

Assembly: ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll)

See Also

IItemContent Members | ITHit.WebDAV.Client Namespace