Sorting array of directory paths by actual directory structure
<p>I have an array of directories (a search which includes subdirectories). I'd like to sort the results, like so:</p>

<pre><code>Test
---A
----A.A
---B
</code></pre>

<p>So the collection lists the directory, and then all of the directories within it, and so forth, for every directory.</p>

<p>How could I sort an array like this?</p>

<p>Thanks</p>
