/// <summary> /// Helper method for NormalizeState(). /// </summary> private void NormalizeServerDirectory(KfsServerDirectory d) { SortedDictionary<String, KfsServerObject> newTree = new SortedDictionary<String, KfsServerObject>(KfsPath.Comparer); foreach (KfsServerObject o in d.ChildTree.Values) { newTree.Add(o.Name, o); KfsServerDirectory od = o as KfsServerDirectory; if (od != null) NormalizeServerDirectory(od); } d.ChildTree = newTree; }
private void GetPathArrayRecursive(List<String> a, KfsServerDirectory c, bool lf) { if (!lf) a.Add(c.RelativePath); foreach (KfsServerObject o in c.ChildTree.Values) { if (o is KfsServerDirectory) { GetPathArrayRecursive(a, o as KfsServerDirectory, lf); } else { a.Add(o.RelativePath); } } if (lf) a.Add(c.RelativePath); }