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:
<folders>
<folder name="directory-name">
<folder name="directory name"
<folder name="directory name">
</folder>
</folder>
</folder>
</folders>
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/.