Cdrom and qt
-
hi to everyone
i want to know how can i determine if any cd/dvd is in my Rom or not?and if some cd/dvd is in , what is its name?
my platform is mac
should i use QDir?how?
thanks a lot -
You could try "QSystemStorageInfo":http://doc.qt.nokia.com/qtmobility/qsystemstorageinfo.html class from the Qt Mobility API.
-
Can i use it on macintosh?i thought it is for mobile programming
-
It should work on the desktop too, but I have not tried it on mac. I don't have one.
-
Aren't removable media automatically mountde in OSX?
-
Could still be useful to know the media though. For instance, you would not allow it as a location to save a file...
-
Uhm...sounds to me much work to prevent users from doing a stupid thing and that cannot be prevented at all....
-
No i want to get a cd name of mounted disk to check if it is an especial disk.
-
On Linux you can use volname to get the name of a volume, maybe on mac there is something like glabel. Why not relying, if possible, on a much more portable approach like checking a file within the cd to see if it is the type you are searching for?
-
On the Mac, mounted CD-ROMs are listed under /Volumes. To check whether your special disk is mounted, just iterate through the entries in /Volumes (using QDir::entryList() or QDir::entryInfoList()) and check if it is the one you search for.