How do I plot the content of a directory and all its subdirectories into infinity using
TreeForm? I've tried using a mix of
GatherBy but in the end I couldn't find even a promising start.
Here's a relatively straightforward "first version":
This has a very poor display capacity if there are more than a certain number of files in a directory level.
It would need a lot of work to make the presentation reasonable in the general case. But this form of tree presentation of a file system also has a lot of potential. For example, you could build a graphical navigation system based on this (though not necessarily with
The following is a slight modification to @amr's code.
It shows a directory tree using
Here is the code required to implement Hypnotoad's solution (see comment to the question). I've copied Leonid's code over from its original thread.
The one problem I had with this solution was that