Ok I have an idea about this.
It is straightforward enough with Windows, to get the list of the local drives you can use AutomationFactory
. There is plenty amount of examples if you google it. Search for something called SilverlightFileExplorer.
Now on a Mac you can use Directory.EnumerateDirectories("/")
and then it gets all the folders in the root. Including Volumes folder which contains shortcuts to the local drives. I'm not an expert of Berkeley System Distribution (BSD) Unix filesystems, so I can't really promise that it would work on any Mac, but this approach works on mine.
I'm still playing around with that. When I get working prototype I'll probably share it through github or something.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…