[Development] QStorageInfo

Bo Thorsen bo at vikingsoft.eu
Tue Aug 26 08:19:04 CEST 2014


Den 25-08-2014 17:16, André Somers skrev:
> Thiago Macieira schreef op 25-8-2014 17:09:
>> On Monday 25 August 2014 13:46:12 André Somers wrote:
>>> ???? ?????????? schreef op 25-8-2014 13:24:
>>>> Can you provide an usecase why you need this feature?
>>> Sure. In our product, we support having the user choose where to put his
>>> database. However, we only support doing that on a local file system, as
>>> experience has shown us that using our database system on a network
>>> drive is too unreliable and leads to database corruption. Therefore, we
>>> need to detect the file system type when the user selects a location for
>>> the database.
>> Do fuse filesystems count as local? Does it depend on what's on the other side
>> of the fuse daemon?
>>
>> How about filesystem type, does it work on ntfs-3g, vfat, etc.?
> Lucky for us, this only runs on Windows, so no fuse or ntfs-3g to deal
> with.

http://dokan-dev.net/en/

> vfat should work fine though, though I don't think we've tested
> that use case. We (currently) supply the hardware as well, and deliver
> with NTFS formatted drives.
>
> We were asked for a use case. I gave one, and even though you can think
> up all kinds of scenario's where the line gets blurry, that does not
> mean that there are no use cases for the simple case. We currently use
> windows API to discover this information. Appearently, microsoft thinks
> that the information is relevant /and/ can be delivered with reasonable
> certainty.

Which is probably the way people will have to go about doing it. Since 
this distinction isn't reliably available on Linux and it is on Windows, 
then the proper way would be to be able to get the native handle on the 
drive to call Windows methods on it.

This is the same I do when I need to do native stuff on Windows in 
Windows (nice terminology). I think it's a mistake to attempt covering 
all use cases in Qt. It's much better to do the common things and allow 
for native calls too.

So what you could do is describe what you would need to call the Windows 
functions for the drive type info. Then we could make sure that the 
storage classes can give this to you.

Bo.

-- 
Viking Software
Qt and C++ developers for hire
http://www.vikingsoft.eu



More information about the Development mailing list