[Development] QStorageInfo

Kuba Ober kuba at mareimbrium.org
Tue Aug 26 18:58:41 CEST 2014


On Aug 26, 2014, at 12:43 PM, Thiago Macieira <thiago.macieira at intel.com> wrote:

> On Tuesday 26 August 2014 09:22:32 Rutledge Shawn wrote:
>> After the harrowing review process (92 rounds of patches over 9 months!) the
>> VolumeTypeFlag didn't end up in the final patch.  It's a credit to Ivan
>> that he had the patience to finally get the current form of QStorageInfo
>> into 5.4 branch at all.  But obviously some users have a need to
>> distinguish network drives from local ones anyway, so IMO there's nothing
>> wrong with writing another patch to make this info available again.  Of
>> course trying to distinguish all the other types: internal, removable,
>> optical, and RAM drives, would probably be futile on many platforms.  We
>> have several bools already, so how about adding a bool isRemote() accessor?
> 
> The problem is that we can't reliably give that information. For example, fuse 
> filesystems on Linux may be both local and remote. What's worse, some local 
> fuse backends may provide worse API than some remote filesystems (locking, 
> etc.)
> 
> Unless we want to make this a tri-state: definitely local, definitely remote, 
> could be either.

Absolutely. It’s not even an option not to distinguish those three states. The consumer of this data can then decide which side to err on if it wishes to be conservative. It also allows the application to query the user for a clarification, if necessary. This is definitely an enum, not a bool.

> I'll block any patch that tries to give a certainty where the lower level 
> doesn't give us certainty.

Yes, please do!

Cheers, Kuba Ober


More information about the Development mailing list