Click or drag to resize

IFolderGetChildren Method (Boolean)

IT Hit WebDAV Classes Reference
Returns children of this folder.

Namespace:  ITHit.WebDAV.Client
Assembly:  ITHit.WebDAV.Client (in ITHit.WebDAV.Client.dll) Version: 2.0.420.0
Syntax
IHierarchyItem[] GetChildren(
	bool recursively
)

Parameters

recursively
Type: SystemBoolean
Indicates if all subtree of children should be returned.

Return Value

Type: IHierarchyItem
Array that include child folders and files.
Exceptions
ExceptionCondition
NotFoundExceptionThis folder doesn't exist on the server.
WebDavHttpExceptionServer returned unknown error.
WebDavExceptionUnexpected error occurred.
Examples
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/"));
IHierarchyItem[] children = folder.GetChildren(false);
foreach (IHierarchyItem item in children)
{
    Console.WriteLine(item.DisplayName);
    IFile file = (IFile)item;
    if(file!=null)
        Console.WriteLine(file.ContentLength);
}
See Also