星空网 > 软件开发 > 操作系统

【代码笔记】获得当前硬盘空间

一,代码。

【代码笔记】获得当前硬盘空间images/loading.gif' data-original="http://common.cnblogs.com/images/copycode.gif" />
- (void)viewDidLoad{  [super viewDidLoad];  // Do any additional setup after loading the view.      NSFileManager *fm = [NSFileManager defaultManager];  NSDictionary *fattributes = [fm attributesOfFileSystemForPath:NSHomeDirectory() error:nil];      NSLog(@"容量%lldG",[[fattributes objectForKey:NSFileSystemSize] longLongValue]/1000000000);  NSLog(@"可用%lldG",[[fattributes objectForKey:NSFileSystemFreeSize] longLongValue]/1000000000);}
【代码笔记】获得当前硬盘空间

 

二,输出。

2015-10-19 13:37:44.929 获得当前硬盘空间[5256:118910] 容量249G2015-10-19 13:37:44.929 获得当前硬盘空间[5256:118910] 可用113G

 




原标题:【代码笔记】获得当前硬盘空间

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

星河造梦机:https://www.goluckyvip.com/tag/44242.html
星徽股份:https://www.goluckyvip.com/tag/44243.html
星空供应链:https://www.goluckyvip.com/tag/44244.html
星乾货运代理:https://www.goluckyvip.com/tag/44245.html
星商电子商务:https://www.goluckyvip.com/tag/44246.html
星商科技:https://www.goluckyvip.com/tag/44247.html
北京丰台区水上乐园哪家好玩?:https://www.vstour.cn/a/366177.html
23点聊电商:“潮起钱塘·境遇未来”2024年跨境电商全平台发展大会圆满完成 :https://www.kjdsnews.com/a/1836652.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流