3 ms·
Handling a power outage during a save typically means writing to a new file and then handling it later. With a big zip I just copy the entire file (hoping that
by alkonaut 9y ago
Handling a power outage during a save typically means writing to a new file and then handling it later. With a big zip I just copy the entire file (hoping that a file copy is reasonably fast) and then do in-place updates in the copy. If all the in-place updates in the copied zip work, then replace the original with the copy.
I haven't found a reasonable way to do this that doesn't require making a copy of the whole original document. If sqlite did this elegantly, I'd switch in a heartbeat.