Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions EUExFileMgr/EUExFileMgr/EUExFileMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
#define F_FILE_EXIST 0
#define F_FILE_NOT_EXIST 1

#define KUEXIS_NSString(x) ([x isKindOfClass:[NSString class]] && x.length>0)
#define KUEXIS_NSMutableArray(x) ([x isKindOfClass:[NSMutableArray class]] && [x count]>0)

@interface EUExFileMgr : EUExBase {
NSMutableDictionary *fobjDict;
FileExplorer *fExplorer;
Expand Down
47 changes: 35 additions & 12 deletions EUExFileMgr/EUExFileMgr/EUExFileMgr.m
Original file line number Diff line number Diff line change
Expand Up @@ -322,23 +322,46 @@ -(void)isFileExistByID:(NSMutableArray *)inArguments{
[self jsFailedWithOpId:0 errorCode:1090901 errorDes:UEX_ERROR_DESCRIBE_ARGS];
}
}
//11.文件浏览器

-(void)explorer:(NSMutableArray *)inArguments {
NSString *inPath = [inArguments objectAtIndex:0];
if (inPath == nil) {
[super jsFailedWithOpId:0 errorCode:1091001 errorDes:UEX_ERROR_DESCRIBE_ARGS];
/**
* @brief 文件浏览器
* @param 协议路径(必须为文件夹路径),若不传或者参数为空,默认为Documents文件
*
**/

- (void)explorer:(NSMutableArray *)inArguments {

NSString *inPath = @"";

if (KUEXIS_NSMutableArray(inArguments)) {

inPath = [inArguments objectAtIndex:0];

}
if ([inPath length]==0) {
inPath = [File getDocumentsPath:@""];
}else {
inPath =[super absPath:inPath];

if ([inPath length] == 0) {

inPath = [File getDocumentsPath:inPath];

} else {

inPath = [super absPath:inPath];

}

if (KUEXIS_NSString(inPath) && [File fileisDirectoy:inPath] ) {

fExplorer = [[FileExplorer alloc] init];
[fExplorer openWithEuex:self rootPath:inPath];

} else {

[super jsFailedWithOpId:0 errorCode:1091001 errorDes:UEX_ERROR_DESCRIBE_ARGS];

}
//open a file explorer
fExplorer = [[FileExplorer alloc] init];
[fExplorer openWithEuex:self rootPath:inPath];

}

//multiExplorer
-(void)multiExplorer:(NSMutableArray*)inArguments{
NSString * inPath = nil;
Expand Down
5 changes: 3 additions & 2 deletions EUExFileMgr/uexFileMgr/info.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<uexplugins>
<plugin
uexName="uexFileMgr" version="3.0.11" build="11">
<info>11:新增cbWriteFile回调方法,优化RC4加密</info>
uexName="uexFileMgr" version="3.0.12" build="12">
<info>12:uexFileMgr.explorer()接口增加参数保护,增加对路径为文件或文件夹的判断,和Android逻辑保持统一.</info>
<build>11:新增cbWriteFile回调方法,优化RC4加密</build>
<build>10:解决多选文件打开浏览器显示空白问题</build>
<build>9:新增方法uexFileMgr.renameFile 重命名文件</build>
<build>8:修复uexFileMgr.multiExplorer(path)中path参数无效的BUG</build>
Expand Down