views:

264

answers:

2

Hi,

I am creating an audio-recording application and I need to know how much disk space is available (not ram).

How can I retrieve it?

Thanks.

+2  A: 

I haven't tried this, but since the iPhone is a UNIX based OS you should be able to get the free space on the flash file system using the statfs system call (see link for documentation).

Just use as parameter the path to the app directory that you plan to write to.

frankodwyer
+1  A: 

This is probably a useful example.

http://kdbdallas.com/2008/12/27/maciphone-show-availble-useable-diskspace/

Gordon Potter