Subject: Store directory structure as template for reference.
	Date: lun 03 mar 14 01:54:05 +0100

Quoting SMITH GREY (lists / ruby-forum.com):

> I am  writing a command line tool to create different directory
> structures (multiple nested folders). As of now there will be 5 to 8
> different directory structures and they may change over time. I am
> therefore considering the option of having an directory 'template' in an
> XML or JSON format which the script can reference.
> 
> This should bypass me having to hard code the directory structure into
> the actual scripts which seems rather silly.

If you are familiar with either format, they are both a good choice -
both are well supported in Ruby. But then, once you have read in the
details from your XML or JSON file, it is up to you to code and debug
the procedure that builds the directory structure. Ruby offers good
tools for manipulating file system (type

ri FileUtils

for example), but I do not think there is something ready-made for
doing what you need to do. 

For XML, have a look here:

http://www.germane-software.com/software/rexml/

(the library is included in MRI Ruby). For JSON type

ri JSON

Carlo  

-- 
  *         Se la Strada e la sua Virtu' non fossero state messe da parte,
* K * Carlo E. Prelz - fluido / fluido.as             che bisogno ci sarebbe
  *               di parlare tanto di amore e di rettitudine? (Chuang-Tzu)