From: Ben Knight Date: 2007-07-25T07:06:40+09:00 Subject: How do I build a tree of directories? Hello. I need to send XML back to a client app listing all my directories and sub-directories on the server. The XML will look something like this: I'm doing this in Rails. I have a couple of questions: 1. In my controller, how do I use something like Find.find(path) to do this effectively? For example, do I need to make recursive calls to a method for each subdirectory encountered? Do I build an array of arrays for the sub-directories? A Hash? 2. Once my array of arrays or hash or whatever is built, what's the best way to output this in my view? Thanks in advance. -- Posted via http://www.ruby-forum.com/.