{
ComputedTreeNode<File> toTreeNodeFunction = new ComputedTreeNode<File>();
toTreeNodeFunction.setAllowsChildrenFunction( ReflectionFunctions.createInvokeMethod("isDirectory"));
//toTreeNodeFunction.setChildrenFunction( FunctionFactory.concatenation(ReflectionFunctions.createInvokeMethod("listFiles"), new ToIteratorFunction<File>(), new ForEachFunction<File, TreeNode>(toTreeNodeFunction), new IteratorToListFunction<TreeNode>(), new CollectionToArrayFunction<TreeNode>(TreeNode.class)));
toTreeNodeFunction.setChildrenFunction( FunctionFactory.concatenation( ReflectionFunctions.createInvokeMethod("listFiles"), new ModifyingFunction( ModifyingFunction.Operation.iterate, toTreeNodeFunction)));
toTreeNodeFunction.setIsLeafFunction(FunctionFactory.concatenation(ReflectionFunctions.createInvokeMethod("isDirectory"), new BooleanFunctions(BooleanFunctions.Operation.not)));
toTreeNodeFunction.setParentFunction(FunctionFactory.concatenation( ReflectionFunctions.createInvokeMethod("getParentFile"), toTreeNodeFunction));
return toTreeNodeFunction.valueOf(file, context);
}