#include <sys/param.h> #include <sys/mount.h> long long freeSpace() { struct statfs buf; long long freespace = -1; if(statfs("/", &buf) >= 0){ freespace = (long long)buf.f_bsize * buf.f_bfree; } return freespace; } +(float)getTotalDiskSpaceInBytes { NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); struct statfs tStats; statfs([[paths lastObject] cString], &tStats); float totalSpace = (float)(tStats.f_blocks * tStats.f_bsize); return totalSpace; }优质内容筛选与推荐>>
1、模板字符串的应用
2、配置centos6.0为Router
3、Docker
4、laravel 权限管理 常用命令
5、No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser").警告解决方法