ios获得文件的大小
获得文件路径
NSString *yourPath = [[NSBundlemainBundle] pathForResource:@"btn_change"ofType:@"png"];
NSFileManager *man = [NSFileManagerdefaultManager];
获得文件的相关属性
NSDictionary *attrs = [man attributesOfItemAtPath: yourPath error: NULL];
得到大小
unsignedlonglong result = [attrs fileSize];
打印
NSLog(@"%lld",result);
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。