[Qt-interest] dd like command
Thiago Macieira
thiago at kde.org
Tue Sep 22 08:26:35 CEST 2009
Em Segunda-feira 21. Setembro 2009, às 23.45.28, Thomas Klein escreveu:
> Hi
> Lets say I have a corrupted SD card, wont mount anymore but I want to make
> a dump.
> Does Qt provide functions to replicate the dd command known on linux?
> I'm working on a app that can retrieve lost files and would be handy if the
> user can create the dump right in the app :)
Fortunately for you, on Linux, the device appears as /dev/something. Open that
device with QFile in QIODevice::Unbuffered mode, then read from it.
Your user needs to have read permissions on the device.
Usually QFile will work on block devices. But every now and then, it may
break. If that happens, please send us a report so that we can work on it. If
you need something urgent, you can always also use low-level calls like
open(2) and read(2).
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
Qt Developer Days 2009 | Registration Now Open!
Munich, Germany: Oct 12 - 14 San Francisco, California: Nov 2 - 4
http://qt.nokia.com/qtdevdays2009
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090922/27e0feee/attachment.bin
More information about the Qt-interest-old
mailing list