删除指定目录下大小为0的所有文件(包含子目录)
- (void)deleteDateWithPath:(NSString *)filePath
{
/**
* 文档目录
*/
NSArray *doc = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *docDir = doc[0];
/**
* 缓存目录
*/
NSArray *cache = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *cacheDir = cache[0];
/**
* 临时文件目录
*/
NSString *tepDir = NSTemporaryDirectory();
NSArray *array = @[docDir,cacheDir,tepDir];
NSFileManager *manager = [NSFileManager defaultManager];
for (NSInteger i = 0; i < array.count; i ++) {
NSString *path = array[i];
if (i == array.count - 1) {
path = [path stringByAppendingString:filePath];
}else{
path = [path stringByApp