diff --git a/EUExFileMgr/EUExFileMgr/EUExFileMgr.m b/EUExFileMgr/EUExFileMgr/EUExFileMgr.m index 0dcddc2..5aeba0c 100755 --- a/EUExFileMgr/EUExFileMgr/EUExFileMgr.m +++ b/EUExFileMgr/EUExFileMgr/EUExFileMgr.m @@ -167,7 +167,8 @@ -(void)openFile:(NSMutableArray *)inArguments { [self jsSuccessWithName:@"uexFileMgr.cbOpenFile" opId:[inOpId intValue] dataType:UEX_CALLBACK_DATATYPE_INT intData:UEX_CSUCCESS]; } return; - }else { + } + else { uexFile = [[EUExFile alloc] init]; } @@ -238,10 +239,12 @@ -(void)deleteFileByID:(NSMutableArray *)inArguments { if ([File removeFile:truePath]) { [fobjDict removeObjectForKey:inOpId]; [self jsSuccessWithName:@"uexFileMgr.cbDeleteFileByID" opId:[inOpId intValue] dataType:UEX_CALLBACK_DATATYPE_INT intData:UEX_CSUCCESS]; - }else { + } + else { [self jsSuccessWithName:@"uexFileMgr.cbDeleteFileByID" opId:[inOpId intValue] dataType:UEX_CALLBACK_DATATYPE_INT intData:UEX_CFAILED]; } - }else { + }else + { [self jsSuccessWithName:@"uexFileMgr.cbDeleteFileByID" opId:[inOpId intValue] dataType:UEX_CALLBACK_DATATYPE_INT intData:UEX_CFAILED]; } }else{ @@ -328,6 +331,7 @@ -(void)isFileExistByID:(NSMutableArray *)inArguments{ //11.文件浏览器 -(void)explorer:(NSMutableArray *)inArguments { + NSString *inPath = [inArguments objectAtIndex:0]; if (inPath == nil) { [super jsFailedWithOpId:0 errorCode:1091001 errorDes:UEX_ERROR_DESCRIBE_ARGS]; @@ -336,6 +340,8 @@ -(void)explorer:(NSMutableArray *)inArguments { inPath = [File getDocumentsPath:@""]; }else { inPath =[super absPath:inPath]; + + NSLog(@"++++++++++++++++++++++++++%@",inPath); } //open a file explorer fExplorer = [[FileExplorer alloc] init]; @@ -453,7 +459,6 @@ - (void)uexCallBack:(id)userInfo { } - //16.读文件 -(void)readFile:(NSMutableArray *)inArguments { NSString *inOpId = [inArguments objectAtIndex:0]; diff --git a/EUExFileMgr/EUExFileMgr/sourceCode/singleFileChoose/FileSelectorViewController.h b/EUExFileMgr/EUExFileMgr/sourceCode/singleFileChoose/FileSelectorViewController.h index f1e2c97..6e48513 100755 --- a/EUExFileMgr/EUExFileMgr/sourceCode/singleFileChoose/FileSelectorViewController.h +++ b/EUExFileMgr/EUExFileMgr/sourceCode/singleFileChoose/FileSelectorViewController.h @@ -33,6 +33,8 @@ @property (nonatomic, retain) UILabel *headLabel; @property (nonatomic, retain) NSMutableString *currentPath; @property (nonatomic, retain) NSMutableArray *fileItemArray; +@property (nonatomic,strong)NSMutableString *chuanRuPath; + @property (nonatomic,assign) id< FileSelectorDelegate > delegate; -(id)initWithRootPath:(NSString *)inPath; @end diff --git a/EUExFileMgr/EUExFileMgr/sourceCode/singleFileChoose/FileSelectorViewController.m b/EUExFileMgr/EUExFileMgr/sourceCode/singleFileChoose/FileSelectorViewController.m index fd81a0a..05a197a 100755 --- a/EUExFileMgr/EUExFileMgr/sourceCode/singleFileChoose/FileSelectorViewController.m +++ b/EUExFileMgr/EUExFileMgr/sourceCode/singleFileChoose/FileSelectorViewController.m @@ -15,12 +15,12 @@ @implementation FileSelectorViewController @synthesize fileItemArray,currentPath; -@synthesize delegate,headView,fTableView,headLabel; +@synthesize delegate,headView,fTableView,headLabel,chuanRuPath; -(void)loadData:(NSString *)relpath{ NSFileManager *fmanager = [NSFileManager defaultManager]; -// NSString *preDirStr = [relpath stringByDeletingLastPathComponent]; + //NSString *preDirStr = [relpath stringByDeletingLastPathComponent]; NSRange range = [relpath rangeOfString:NSHomeDirectory()]; NSString *subPath = [relpath substringFromIndex:range.length]; if (subPath) { @@ -44,7 +44,8 @@ -(void)loadData:(NSString *)relpath{ } //init --(id)initWithRootPath:(NSString *)inPath{ +-(id)initWithRootPath:(NSString *)inPath{ + self = [super init]; if (self != nil) { NSString *relpath; @@ -56,6 +57,7 @@ -(id)initWithRootPath:(NSString *)inPath{ currentPath = [[NSMutableString alloc]initWithString:inPath];; relpath = inPath; } + chuanRuPath=[[NSMutableString alloc]initWithString:relpath]; [self loadData:relpath]; } return self; @@ -187,14 +189,15 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N return cell; } -(void)backBtnClick{ - if ([currentPath isEqualToString:NSHomeDirectory()]) { + + + if ([currentPath isEqualToString:chuanRuPath]) { [self.navigationItem.leftBarButtonItem setEnabled:NO]; - if(delegate!=nil && [delegate respondsToSelector: @selector(fileSelectCancled:)] == YES){ [delegate fileSelectCancled:self]; } -// return; + return; } [currentPath setString:[currentPath stringByDeletingLastPathComponent]]; [self loadData:currentPath]; @@ -207,7 +210,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath NSString *fileName = item.fileName; [currentPath setString:[currentPath stringByAppendingPathComponent:fileName]]; - PluginLog(@"current path = %@",currentPath); if ([item.itemType intValue]==1&&[item.subItems count]==0) { [currentPath setString:[currentPath stringByDeletingLastPathComponent]]; return; @@ -291,6 +293,7 @@ - (void)dealloc { [fileItemArray release]; [currentPath release]; + [chuanRuPath release]; [super dealloc]; } diff --git a/EUExFileMgr/uexFileMgr/info.xml b/EUExFileMgr/uexFileMgr/info.xml index 652580f..dae55b2 100755 --- a/EUExFileMgr/uexFileMgr/info.xml +++ b/EUExFileMgr/uexFileMgr/info.xml @@ -1,8 +1,9 @@ - 19:添加IDE支持 + uexName="uexFileMgr" version="3.0.20" build="20"> + 20:修改能够直接返回到应用程序界面,而不能通过该页面返回到附件的父目录下 + 19:添加IDE支持 18:删除info.plist 17:添加国际化支持 16:getFileListByPath不再返回其子目录下的文件路径 diff --git a/EUExFileMgr/uexFileMgr/libuexFileMgr.a b/EUExFileMgr/uexFileMgr/libuexFileMgr.a index 31c358c..4ec9266 100644 Binary files a/EUExFileMgr/uexFileMgr/libuexFileMgr.a and b/EUExFileMgr/uexFileMgr/libuexFileMgr.a differ