|
@@ -18,6 +18,7 @@
|
|
|
#import "PCLoginViewController.h"
|
|
|
#import "cloudPhoneModelViewController.h"
|
|
|
#import "audioPlayerViewController.h"
|
|
|
+#import "nasUploadFileManager.h"
|
|
|
|
|
|
@interface mineViewController ()
|
|
|
@property(nonatomic,strong)UIButton *netButton;
|
|
@@ -407,17 +408,17 @@
|
|
|
NSString *downLoadingPath = [NSString stringWithFormat:@"%@/DownLoadFlie",CachesPatch];
|
|
|
long downLoadingSizeBeforeClear = [iTools folderSizeAtPath:downLoadingPath];
|
|
|
|
|
|
-// NSString *downLoadingFileName = nil;
|
|
|
-// if([downloadManager shareInstance].curDownloadFileModel
|
|
|
-// && ([downloadManager shareInstance].curDownloadFileModel.curDownloadStateType == downloadStateUploading
|
|
|
-// ||[downloadManager shareInstance].curDownloadFileModel.curDownloadStateType == downloadStateSuspend)){
|
|
|
-// downLoadingFileName = [[downloadManager shareInstance].curDownloadFileModel getFileNameFun];
|
|
|
-//
|
|
|
-// [self deleteFilesInDirectoryAtPath:downLoadingPath withOutFileName:downLoadingFileName];
|
|
|
-// }
|
|
|
-// else{
|
|
|
-// [[NSFileManager defaultManager] removeItemAtPath:downLoadingPath error:nil];
|
|
|
-// }
|
|
|
+ NSString *downLoadingFileName = nil;
|
|
|
+ if([downloadManager shareInstance].curDownloadFileModel
|
|
|
+ && ([downloadManager shareInstance].curDownloadFileModel.curDownloadStateType == downloadStateUploading
|
|
|
+ ||[downloadManager shareInstance].curDownloadFileModel.curDownloadStateType == downloadStateSuspend)){
|
|
|
+ downLoadingFileName = [[downloadManager shareInstance].curDownloadFileModel getFileNameFun];
|
|
|
+
|
|
|
+ [self deleteFilesInDirectoryAtPath:downLoadingPath withOutFileName:downLoadingFileName];
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ [[NSFileManager defaultManager] removeItemAtPath:downLoadingPath error:nil];
|
|
|
+ }
|
|
|
|
|
|
[[NSFileManager defaultManager] removeItemAtPath:downLoadingPath error:nil];
|
|
|
long downLoadingSizeAfterClear = [iTools folderSizeAtPath:downLoadingPath];
|
|
@@ -429,7 +430,7 @@
|
|
|
NSMutableString* where = [[NSMutableString alloc] initWithString:@"where "];
|
|
|
NSString *curStr = [NSString stringWithFormat:@"%@=%@ or %@=%@ ",bg_sqlKey(@"curDownloadStateType"),bg_sqlValue([NSNumber numberWithInt:downloadStateDone]),bg_sqlKey(@"curDownloadStateType"),bg_sqlValue([NSNumber numberWithInt:downloadStateFail])];
|
|
|
[where appendString:curStr];
|
|
|
- [couldPhoneFileModel bg_deleteAsync:download_tableName where:where complete:^(BOOL isSuccess) {
|
|
|
+ [couldPhoneFileModel bg_deleteAsync:nas_box_download_tableName where:where complete:^(BOOL isSuccess) {
|
|
|
}];
|
|
|
|
|
|
//上传完成
|
|
@@ -438,7 +439,7 @@
|
|
|
bg_sqlKey(@"curUploadStateType"),bg_sqlValue([NSNumber numberWithInt:uploadStateFail])];
|
|
|
[where2 appendString:curStr2];
|
|
|
|
|
|
- [uploadFileDataModel bg_deleteAsync:upLoadFile_image_tableName where:where2 complete:^(BOOL isSuccess) {
|
|
|
+ [uploadFileDataModel bg_deleteAsync:nasUpLoadFile_tableName where:where2 complete:^(BOOL isSuccess) {
|
|
|
}];
|
|
|
|
|
|
//清理音频播放缓存
|
|
@@ -449,6 +450,9 @@
|
|
|
long curTotolSize = (downLoadingSizeBeforeClear - downLoadingSizeAfterClear) + (vide0AllSizeBeforeClear - vide0AllSizeAfterClear) + imageAllSize + clearTotal + audioPlayAllSize;
|
|
|
|
|
|
[self showClearAllTipBy:curTotolSize];
|
|
|
+
|
|
|
+ [[nasUploadFileManager shareInstance].databaseArr removeAllObjects];
|
|
|
+ [[nasDownloadFileManager shareInstance].databaseArr removeAllObjects];
|
|
|
}
|
|
|
|
|
|
- (BOOL)deleteFilesInDirectoryAtPath:(NSString *)path withOutFileName:(NSString*)fileNames {
|