iPhone:可用磁盘空间 [英] iPhone: available disk space

查看:98
本文介绍了iPhone:可用磁盘空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在创建一个音频录音应用程序,我需要知道有多少磁盘空间可用(不是ram)。



如何检索? p>

谢谢。

解决方案

我没有尝试过, iPhone是基于UNIX的操作系统,您应该能够使用 statfs 系统调用(请参阅文档链接)。



只需使用您计划写入的应用程序目录的路径作为参数。


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.

解决方案

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.

这篇关于iPhone:可用磁盘空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆