获取文件大小(字节数)

来源:互联网 发布:java线程挂起 编辑:程序博客网 时间:2024/06/03 21:10
NSString *imagePath = [[NSBundle mainBundle] pathForResource:@"image1" ofType:@"jpeg"];NSDictionary *attributes = [[NSFileManager defaultManager] attributesOfItemAtPath:imagePath error:nil];unsigned long long fileSize = [attributes fileSize];NSLog(@"========%lldB", fileSize);

0 0
原创粉丝点击