开发者

Out of space error in iPhone

In iPhone, how do you determine if a file couldn't be written to the documents are开发者_如何学Goa because of an out of space error?


fwrite returns the number of items written, so you can check if it's consistent to know if there's any errors:

if (fwrite(data, sizeof(Something), 1234, fp) != 1234) {
  // handle error.
}

This is the only documented way to check if a fwrite failure (including out-of-space error) happens.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜