IFolder.ItemExists Method 

IT Hit WebDAV for .NET

Checks whether specified item exists in the folder.

[Visual Basic]
Function ItemExists( _
   ByVal name As String _
) As Boolean
[C#]
bool ItemExists(
   string name
);

Parameters

name
Item's name

Return Value

True, if specified item exists; false, otherwise.

Example

string license = "<?xml version='1.0' encoding='utf...
WebDavSession session = new WebDavSession(license);
session.Credentials = new NetworkCredential("User1", "pwd");
IFolder srcFolder = session.OpenFolder(new Uri("http://server:8080/Library/"));
bool isItemExists = srcFolder.ItemExists("image.gif");
if(isItemExists)
    Console.WriteLine("Item exists");
else
    Console.WriteLine("Item not found");

See Also

IFolder Interface | ITHit.WebDAV.Client Namespace