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: 6.0.4052-Beta
Syntax
public interface IHierarchyItem

The IHierarchyItem type exposes the following members.

Properties
  NameDescription
Public propertyCode exampleActiveLocks
Array of item's lock descriptions.
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
Custom properties retrieved by [!:IFolder.GetChildrenAsync(bool, PropertyName[])] call.
Public propertySupportedLock
Lock types supported by the item.
Top
Methods
  NameDescription
Public methodCode exampleCopyToAsync
Copies this item to destination folder.
Public methodCode exampleDeleteAsync(IDictionaryString, String, CancellationToken)
Deletes this item.
Public methodDeleteAsync(String, IDictionaryString, String, CancellationToken)
Deletes this item.
Public methodCode exampleDeleteAsync(LockUriTokenPair, IDictionaryString, String, CancellationToken)
Deletes this item.
Public methodCode exampleGetActiveLocksAsync Obsolete.
Retrieves lock information about this item.
Public methodCode exampleGetAllPropertiesAsync
Retrieves all custom properties exposed by the item.
Public methodGetCommentAsync
Brief comment about an item that is suitable for presentation to a user.
Public methodGetCreatorDisplayNameAsync
Contains a description of the creator of the item that is suitable for presentation to a user.
Public methodCode exampleGetParentAsync
Retrieves parent hierarchy item of this item.
Public methodCode exampleGetPropertyNamesAsync
Returns names of all custom properties exposed by this item.
Public methodCode exampleGetPropertyValuesAsync
Retrieves values of specific properties.
Public methodGetSourceAsync
Retrieves media type independent links.
Public methodGetSupportedLockAsync Obsolete.
Retrieves information about supported locks.
Public methodCode exampleLockAsync
Locks the item.
Public methodCode exampleMoveToAsync(IFolder, String, Boolean)
Moves this item to another location.
Public methodCode exampleMoveToAsync(IFolder, String, Boolean, LockUriTokenPair)
Moves this item to another location.
Public methodCode exampleRefreshAsync
Rereads item properties from server.
Public methodCode exampleRefreshLockAsync
Prolongs the lock.
Public methodCode exampleSetCommentAndAuthorAsync(String, String)
Updates comment and author information.
Public methodSetCommentAndAuthorAsync(String, String, String)
Updates comment and author information.
Public methodCode exampleSupportedFeaturesAsync
Gets the information about functionality supported by server (Class 1, Class 2 and so on).
Public methodCode exampleUnlockAsync(String, IDictionaryString, String, CancellationToken)
Remove the locks.
Public methodUnlockAsync(LockUriTokenPair, IDictionaryString, String, CancellationToken)
Public methodCode exampleUpdatePropertiesAsync(Property, PropertyName)
Updates values of properties exposed by this item.
Public methodCode exampleUpdatePropertiesAsync(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 = await session.GetFolderAsync(new Uri("https://server:8080/Library/Sales"));
IFolder dstFolder = await session.GetFolderAsync(new Uri("https://server:8080/Library/"));

try
{
    await srcFolder.CopyToAsync(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