iOS???????????????
???????????? ???????[ 2015/3/6 15:11:40 ] ????????iOS ???????? ???????
	??????????????????????????????????????洦????????????????????????к????е???????????SDWebImage??
	????????????????????????洢???????????????????????????????????????app????書(shū)???
	???????????????湦??????????????????????С??????????????????????
	?????????????????С
	??????????????????????У???????????NSFileManager API??????????????С?????
	???????????????С
	????+(float)fileSizeAtPath:(NSString*)path{
	????NSFileManager*fileManager=[NSFileManager defaultManager];
	????if([fileManager fileExistsAtPath:path]){
	????long long size=[fileManager attributesOfItemAtPath:path error:nil].fileSize;
	????return size/1024.0/1024.0;
	????}
	????return 0;
	????}
	????????????С
	????+(float)folderSizeAtPath:(NSString*)path{
	????NSFileManager*fileManager=[NSFileManager defaultManager];
	????float folderSize;
	????if([fileManager fileExistsAtPath:path]){
	????NSArray*childerFiles=[fileManager subpathsAtPath:path];
	????for(NSString*fileName in childerFiles){
	????NSString*absolutePath=[path stringByAppendingPathComponent:fileName];
	????folderSize+=[FileService fileSizeAtPath:absolutePath];
	????}
	????//SDWebImage????????????????
	????folderSize+=[[SDImageCache sharedImageCache]getSize]/1024.0/1024.0;
	????return folderSize;
	????}
	????return 0;
	????}
	??????????????
	??????????????NSFileManager API?????????????SDWebImage???????????????????????????????????á?
	????+(void)clearCache:(NSString*)path{
	????NSFileManager*fileManager=[NSFileManager defaultManager];
	????if([fileManager fileExistsAtPath:path]){
	????NSArray*childerFiles=[fileManager subpathsAtPath:path];
	????for(NSString*fileName in childerFiles){
	????//???????????????????????????????????
	????NSString*absolutePath=[path stringByAppendingPathComponent:fileName];
	????[fileManager removeItemAtPath:absolutePath error:nil];
	????}
	????}
	????[[SDImageCache sharedImageCache]cleanDisk];
	????}
	???????Ч????
	
??????
					
					???·???
App??С????H5?????????????????Щ??
2024/9/11 15:34:34?????????????????????????
2024/9/10 11:13:49P-One ???????????????????????????????????????
2024/9/10 10:14:12???????????????????????????
2024/9/9 18:04:26??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44
					
			
								
								
								
								
								
								
								
								
								
								
				
sales@spasvo.com