Would it be possible to extend the getSpecialLocation function to handle more CSIDL_ ids? It would be nice to have a My Computer top level entry (CSIDL_DRIVES) in the file tree component, for example. I know this is a virtual folder and I’m not too familiar with other platforms either, so I have no idea how feasible this is.
Well, what exactly do you need this for? I’m not going to add any win32-specific hacks to the File class, but if you can suggest a nice, cross-platform function that solves your problem, then that might be good.
I understand that. In my app I need a single tree view with all local (and possibly network) drives on the top level, kind of like it would be ‘My Computer’ (so the user can work on several folders scattered around the computer). A FileBrowserComp is not the best fit for it.
I thought maybe a FileTreeComponent subclass could be combined with the FileBrowserComponent functionality, where it has the drives and special locations in a combo box. Instead of a combo, here the drives etc. would be the top level tree items.
And the FileBrowserComponent is more or less cross-platform.
Yeah, we already have File::findFileSystemRoots(), what I would need is put these on the top level of FileTreeComponent. Which may not be trivial, because it would require several DirectoryContentsLists and I don’t know how good is sharing a single time sliced thread etc.