Namespace: ITHit.WebDAV.Server
The code below is part of 'WebDAVServer.NtfsStorage' sample provided with the SDK.
public virtual IEnumerable<IHierarchyItem> GetChildren(IList<PropertyName> propNames) { // Enumerates all child files and folders. // You can filter children items in this implementation and // return only items that you want to be visible for this // particular user. IList<IHierarchyItem> children = new List<IHierarchyItem>(); FileSystemInfo[] fileInfos = context.FileOperation( this, () => dirInfo.GetFileSystemInfos(), Privilege.Read); foreach (FileSystemInfo fileInfo in fileInfos) { string childPath = Path + EncodeUtil.EncodeUrlPart(fileInfo.Name); IHierarchyItem child = context.GetHierarchyItem(childPath); if (child != null) { children.Add(child); } } return children; }