IFolder.Children Property

IT Hit WebDAV for .NET

Gets the array of this folder's children.

[Visual Basic]
Property Children As IHierarchyItem()
[C#]
IHierarchyItem[] Children {get;}

Property Value

Array of IHierarchyItem objects. Each item is a resource, folder or lock-null item.

Example

    public IHierarchyItem[] Children
    {
        get
        {
            ArrayList children = new ArrayList();

            DirectoryInfo directory = (DirectoryInfo)fileSystemInfo;
            FileSystemInfo[] aFSI = directory.GetFileSystemInfos();
            foreach(FileSystemInfo item in aFSI)
            {
                if (item is DirectoryInfo)
                    children.Add(new Folder((DirectoryInfo)item));
                else
                {
                    if( (item.Attributes & FileAttributes.Temporary)!=0 )
                        children.Add(new LockNull((FileInfo)item));
                    else
                        children.Add(new Resource((FileInfo)item));
                }
            }
    
            return (IHierarchyItem[])children.ToArray(typeof(IHierarchyItem));
        }
    }
 

See Also

IFolder Interface | ITHit.WebDAV.Server Namespace