can someone give me some pointers for this. I want take a list of file paths (just Strings) and convert into a hierachial tree like structure. So there are two tasks, parsing the strings to create a tree, and creating a tree or some sort of mapping structure to actually put the result into. (The third task is then to parse the tree to display as as a tree in html)
I'm using Java 7 so I assume i could use Paths to accomplish the first part, but struggling to get a clear algorithm in place.
C:\Music\Blur\Leisure
C:\Music\KateBush\WholeStory\Disc1
C:\Music\KateBush\WholeStory\Disc2
C:\Music\KateBush\The Kick Inside
C:\Music\KateBush\The Dreaming
C:\MusicUnprocessed\Blue\ParkLife
So it gives
C:\
Music
Blur
Leisure
Kate Bush
Whole Story
Disc 1
Disc 2
The Kick Inside
The Dreaming
MusicProcessing
Blur
ParkLife