Click or drag to resize

IHierarchyItem Interface

IT Hit WebDAV Classes Reference
Represents one WebDAV item (file, folder, version or lock-null).

Namespace:  ITHit.WebDAV.Client
Assembly:  ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll) Version: 2.0.420.0
Syntax
public interface IHierarchyItem : IConnectionSettings

The IHierarchyItem type exposes the following members.

Properties
  NameDescription
Public propertyCode exampleActiveLocks
Array of item's lock descriptions.
Public propertyAllowWriteStreamBuffering
Gets or sets a value that indicates whether to buffer the data sent to server.
(Inherited from IConnectionSettings.)
Public propertyCreationDate
The date item was created.
Public propertyDisplayName
User friendly item name.
Public propertyHref
This item path on the server.
Public propertyItemType
Type of the item (File, Folder, Version or VersionHistory)
Public propertyLastModified
Most recent modification date.
Public propertyCode exampleProperties
Public propertySendChunked
Gets or sets a value that indicates whether to send data in segments.
(Inherited from IConnectionSettings.)
Public propertySupportedLock
Lock types supported by the item.
Public propertyTimeOut
Sets and gets time-out in milliseconds.
(Inherited from IConnectionSettings.)
Top
Methods
  NameDescription
Public methodCode exampleCopyTo(IFolder, String, Boolean, Boolean)
Copies this item to destination folder.
Public methodCode exampleCopyTo(IFolder, String, Boolean, Boolean, LockUriTokenPair)
Copies this item to destination folder.
Public methodCode exampleDelete
Deletes this item.
Public methodDelete(String)
Deletes this item.
Public methodCode exampleDelete(LockUriTokenPair)
Deletes this item.
Public methodCode exampleGetActiveLocks Obsolete.
Retrieves lock information about this item.
Public methodCode exampleGetAllProperties
Retrieves all custom properties exposed by the item.
Public methodGetComment
Brief comment about an item that is suitable for presentation to a user.
Public methodGetCreatorDisplayName
Contains a description of the creator of the item that is suitable for presentation to a user.
Public methodCode exampleGetParent
Retrieves parent hierarchy item of this item.
Public methodCode exampleGetPropertyNames
Returns names of all custom properties exposed by this item.
Public methodCode exampleGetPropertyValues
Retrieves values of specific properties.
Public methodGetSource
Retrieves media type independent links.
Public methodGetSupportedLock Obsolete.
Retrieves information about supported locks.
Public methodCode exampleLock
Locks the item.
Public methodCode exampleMoveTo(IFolder, String, Boolean)
Moves this item to another location.
Public methodCode exampleMoveTo(IFolder, String, Boolean, LockUriTokenPair)
Moves this item to another location.
Public methodCode exampleRefresh
Rereads item properties from server.
Public methodCode exampleRefreshLock
Prolongs the lock.
Public methodCode exampleSetCommentAndAuthor(String, String)
Updates comment and author information.
Public methodSetCommentAndAuthor(String, String, String)
Updates comment and author information.
Public methodCode exampleSupportedFeatures
Gets the information about functionality supported by server (Class 1, Class 2 and so on).
Public methodCode exampleUnlock
Removes the lock.
Public methodCode exampleUpdateProperties(Property, PropertyName)
Updates values of properties exposed by this item.
Public methodCode exampleUpdateProperties(Property, PropertyName, String)
Updates values of properties exposed by this item.
Top
Examples
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/Sales"));
IFolder dstFolder = session.OpenFolder(new Uri("http://server:8080/Library/"));

try
{
    srcFolder.CopyTo(dstFolder, "Test1", true, false);
}
catch (PreconditionFailedException)
{
    Console.WriteLine("The destination item exists and 'overwrite' was 'false'.");
}
catch (WebDavHttpException ex)
{
    Console.WriteLine(ex.Message + " " + ex.Status.Code + " " + ex.Status.Description);
    foreach (IMultistatusResponse resp in ex.Multistatus.Responses)
    { // Find which items failed to move.
        Console.WriteLine(resp.Href + " " + resp.Status.Code + " " + resp.Status.Description);
    }
}
See Also