NSFileManager - 检查文件大小? [英] NSFileManager - Check file size?
本文介绍了NSFileManager - 检查文件大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在我的某个应用中录制声音文件。我想弄清楚如何获取录制文件的文件大小?
I am recording sound file in one of my apps. I am trying to figure out how to get the file size of the recorded file?
我知道如何获得它和它的路径,我只是想不通怎么样得到文件大小。
I know how to get it and it's path, I just can not figure out how to get the file size.
谢谢
Shani
Thanks Shani
推荐答案
你可以使用:
- (NSDictionary *)attributesOfItemAtPath:(NSString *)path error:(NSError **)error
获取文件属性字典并可以获取 [dictObject valueForKey @NSFileSize ];
to get the file property dictionary and can fetch [dictObject valueForKey@"NSFileSize"];
这篇关于NSFileManager - 检查文件大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文