Retrieving available drives?

Previous topic - Next topic

fuzzy70

Hi all, I am currently writing a simple file requester for a program I'm working on (keyboard controlled at the moment but will progress to graphical at some point) & have hit a stumbling block.
I need to be able to access different drives including optical ones but as yet not found a way to select them other than the root directory of the current drive.

There is 2 reasons why I am not using the inbuilt command. First it's windows only & I will be using the final program on occasion in Linux, second it crashes everytime I call it when in debug mode which is every run so far till the program is complete :-).

Any help/ideas would be great.

Cheers

Lee


Sent from my GT-I5700 using Tapatalk 2
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

MrTAToad

With Windows, you might need to call GetLogicalDriveStrings  or a variant.  For Linux, I wouldn't know unfortunately.

fuzzy70

Linux is easy as no matter how many drives/partitions you have they are all accessible from the root folder in /media or /mount depending on distribution.

Will have a look at what you mentioned MrT & see where that leads me :-). Thanks

Lee

Sent from my GT-I5700 using Tapatalk 2
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)