Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone: available disk space

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.

like image 815
Ilya Suzdalnitski Avatar asked May 22 '26 05:05

Ilya Suzdalnitski


1 Answers

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.

like image 176
frankodwyer Avatar answered May 24 '26 22:05

frankodwyer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!