[prev in list] [next in list] [prev in thread] [next in thread]
List: ruby-talk
Subject: Re: Create a directories list with sub-directories
From: "Mehr, Assaph (Assaph)" <assaph () avaya ! com>
Date: 2004-03-24 1:42:37
Message-ID: 338366A6D2E2CA4C9DAEAE652E12A1DE01115DD1 () au3010avexu1 ! global ! avaya ! com
[Download RAW message or body]
>> I've a problem. How can I create a directory list with all
>> sub-directories and files like this:
> If you really want to output an indented tree-like view of a directory
> along with its subdirectories, then the Find module may not be the
> best tool insofar as it produces a "flattened" view of your directory
> structure. You'll have to do some additional work to "unflatten" it
> back into a tree structure. Because of this, you may be better off
> performing your own directory traversal rather than relying on Find.
> Something along the following lines will give you an indented view:
On a lot of systems you can use the 'tree' command.
Try:
ruby -e "puts `tree`" (or ruby -e "puts `tree.COM`" on windows).
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic