return c.compare(((VFSItem)o1).getName(), ((VFSItem)o2).getName());
}});
boolean addedAtLeastOneChild = false;
for (Iterator iter = children.iterator(); iter.hasNext();) {
VFSItem child = (VFSItem) iter.next();
String childName = child.getName();
if (child instanceof VFSContainer) {
// container node
String filePath = parentPath + childName + "/";
GenericTreeNode tChild = new GenericTreeNode(childName, filePath); // filePath is the information to be remembered later
tChild.setIconCssClass("b_filetype_folder");
tChild.setAltText(child.getName());
tChild.setAccessible(selectableFolders ? (child.canWrite() == VFSConstants.YES) : false);
tParent.addChild(tChild);
boolean addedChildren = buildTree(tChild, (VFSContainer)child, filePath);
if (foldersOnly || addedChildren) {
addedAtLeastOneChild = true;
} else {