[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Mountable devices support in KDE
From: Kevin Ottens <ervin () kde ! org>
Date: 2009-09-15 9:46:08
Message-ID: 200909151146.13510.ervin () kde ! org
[Download RAW message or body]
On Monday 14 September 2009 17:35:34 David Faure wrote:
> Ah, but we can only recognize /dev/sdb1 if it's already mounted; otherwise
> (if it's not mounted and it's not in fstab), how can we find out it's a
> mountable device? Via Solid maybe? Kevin? ;)
Hm, something like:
QList<Solid::Device> list = Solid::Device::listFromQuery(
"[ IS StorageAccess and Block.device == '/dev/sdb1' ]");
if (list.isEmpty()) {
// Whoops, /dev/sdb1 isn't available, or is not something we can mount
} else {
// Cool! We found the thing to mount!
}
Would work I think.
Regards.
--
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic