Application interruption while storing file to archive

Jun 14, 2011 at 1:48 AM

Hi!

Your lib is a realy very useful tool, but I have several fears:
What will happen if the user will interrupt the application while it's saving file to FileDB archive? Could it happen that the whole archive will be damaged?

Thanks for your lib and good luck! :)

Coordinator
Jun 14, 2011 at 2:36 AM

Hello,

FileDB has no rollback while inserting files. But, if you see Write method (on Engine.cs), first I find next index position and then insert all bytes. Only after all bytes inserted, I update header page and index page. With this, if a file interrupt whiling data insert, there are no valid bytes inserted. When you use again the datafile to insert more bytes, FileDB will use same Data Pages used before.

If you have any problem with this, tell me.

Regards,

    Maurício