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

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
Public propertySupportedLock
Lock types supported by the item.
Top
Methods
  NameDescription
Public methodCode exampleCopyToAsync
Copies this item to destination folder.
Public methodCode exampleDeleteAsync
Deletes this item.
Public methodDeleteAsync(String)
Deletes this item.
Public methodCode exampleDeleteAsync(LockUriTokenPair)
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)
Remove the locks.
Public methodUnlockAsync(LockUriTokenPair)
Removes the locks. For details UnlockAsync(String).
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