|
:: And I understand your comment about WriteInfo().
Hi,
I also vote for an overwrite option for writeinfo() :-)
In my case I use ExifTool on an open filehandle as an info plugin for this file. There is no way to delete this file and use a simple renaming - If I loose my handle my program simply crashs so I have to use a quite complex transfer temp--+mem; delete temp; mem--+file :
if (status > 0) {
QFile rfile( dest );
rfile.open( IO_ReadOnly );
QDataStream rstream( &rfile );
QByteArray membuf( rfile.size() );
rstream.readRawBytes( membuf.data(), membuf.size() );
rfile.close();
rfile.remove();
QFile wfile( source );
wfile.open( IO_WriteOnly );
QDataStream wstream( &wfile );
wstream.writeRawBytes( membuf.data(), membuf.size() );
wfile.close();
}
//sorry again for posting C++ in a Perl forum :o)
An overwrite option that does not delete the file but writes only a new header would be perfect and leads to a huge speed-up for my program.
Bye
Thorsten
|