views:

516

answers:

2

I want to be able to 'reserve' a set amount of disk space on my iPhone for my particular application. Before I get flamed I should add this is NOT for a public application.

I assume the simplest way to do this is to actually create blocks of files up to the space I wish to reserve and then delete and use these blocks as necessary.

Is there any filesystem operation which might allow me to do this without actually having to write content for all the space I want to allocate? I'm asking this because I'm not sure lazy the disk space allocator might be.

A: 

No, this is something well outside the SDK. You'll have to create your own methods to handle this for you.

August
A: 

iTunes ensures there's at least 200MB available after every sync. It's only the users who don't sync regularly that can cause issues (and even then they are prompted to free up space when they go below 50MB free).

Instead of reserving space, why not simply pop up an alert when disk space is low? (and enter a feature reduced mode)

rpetrich