iPhone file corruption
Posted
by sfider
on Stack Overflow
See other posts from Stack Overflow
or by sfider
Published on 2010-03-21T12:43:00Z
Indexed on
2010/03/21
12:51 UTC
Read the original article
Hit count: 493
Is it possible (on iPhone/iPod Touch) for a file written like this:
if (FILE* file = fopen(filename, "wb")) {
fwrite(buf, buf_size, 1, file);
fclose(file);
}
to get corrupted, e.g. when app is forced to terminate?
From what I know fwrite should be an atomic operation, so when I write whole file with one instruction no corruption should occure. I could not find any information on the net that would say otherwise.
© Stack Overflow or respective owner