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);
获取文件大小(字节数)
最新推荐文章于 2021-05-17 03:18:32 发布