工具类下载地址: https://git.oschina.net/qjz.com/Clean/tree/master
使用方法
<pre>
//获取缓存文件夹路径
NSString *cachPath = [NSSearchPathForDirectoriesInDomains(NSCachesDirectory,NSUserDomainMask, YES) objectAtIndex:0];
//删除应用缓存数据
[FileUtil deleteSize: cachPath complete:^{
NSLog(@"已删除");
}];
//获取缓存大小
float size=[FileUtil getSize: cachPath];
NSLog(@"%.2f",size);
</pre>