[Interest] Getting the list of mounted network volumes
stephen at ju-ju.com
Tue Sep 4 23:29:45 CEST 2012
On 9/4/12 3:14 PM, Lorn Potter wrote:
> On 31/08/2012, at 3:44 AM, Stephen Chu <stephen at ju-ju.com> wrote:
>> On 8/30/12 1:35 PM, Thiago Macieira wrote:
>>> On quinta-feira, 30 de agosto de 2012 13.15.36, Stephen Chu wrote:
>>>> Hi List.
>>>> Is there a way to get a list of currently mounted network volumes? Or
>>>> just mounted volumes?
>>> http://doc.qt.nokia.com/qtmobility/qsystemstorageinfo.html is the closest
>>> Why do you want to know that information?
>> All apps in our system read and write files on a common network volume.
>> One of the initial setup that a user needs to do is to tell the app
>> where that volume is. The goal is to present a list of currently mounted
>> network volumes and let the user just pick from it.
>> I guess I will have to do platform specific code for this.
> QStorageInfo does this. It even uses UDisks.
> allLogicalDrives() (probably not the best name) should return mounted network drives as well.
> then just pass those through driveType() and test for RemoteDrive
> of course, we could also add something like:
> QStringList allRemoteDrives()
Wow. Thanks for pointing this out. I didn't build qtsystems module in my
install and couldn't find anything about it.
Now that I built and tried it, it doesn't seem to work on Mac.
allLogicalDrives() returns an empty list.
It does returns a list of mapped driver letters on Windows. But there
doesn't seem to be a way to get a volume's URI/UNC like
More information about the Interest