I need to replicate the functionality of a file directory tree as a list. I have to be able to search for specific "documents" through the "folders". All of which may contain duplicate names at other depths. I also have to be able to dynamically add new files and folders during runtime. So for example, a file tree like this:
MyFiles
    Important
        doc1
        doc2
    LessImportant
        doc3
        doc4
    LowPriority
        Important
            doc1
        LessImportant
            doc4
If I use nested lists, the above tree would end up looking like:
[MyFiles,[Important,[doc1,doc2],LessImportant,[doc3,doc4],LowPriority, 
[Important,[doc1],LessImportant,[doc4]]]]
And then I would have to run loops through all the nests to search for stuff and use .append to add new "folders" or "documents".
Is there a better / more efficient way than nested lists?
 
     
     
     
    