Re: iOS disk full?
Re: iOS disk full?
- Subject: Re: iOS disk full?
- From: Uli Kusterer <email@hidden>
- Date: Thu, 21 Jun 2012 12:46:21 +0200
On 19.06.2012, at 02:55, Jens Alfke wrote:
> Fundamentally, you'll get errors from file operations that fail due to insufficient disk space. The errors depend on the API; e.g. for POSIX calls you'll see ENOSPC.
>
> However, running out of disk space is a pretty bad situation for the OS as a whole, so generally it doesn't let things get that far. As disk space runs out it'll start notifying the user, and it might also start freezing apps (OS X does this.) In the worst case, you can pretty much lock up the whole device if space runs out.
Not really. On Mac OS X, you can freeze it up because you will no longer have swap space, which causes both hard disk and RAM to be full. On iOS, there is no virtual memory for RAM, so apps will not have too many problems unless they try to write more to the disk and can't handle that.
> If your app has the potential to create large files, it would be polite to preflight disk space and stop writing if the free space gets below a few hundred megabytes.
Something we do when recording to disk is look at the disk space periodically, and if it goes below a certain limit (but isn't yet completely full), abort the recording and inform the user. Don't let it come to a point where you actually fill the disk.
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden