提交 6a889dbd 编写于 作者: L liuxiaoyang 提交者: mizikoi53

getFileList接口根据wiki文档修改参数,并加上isRootPath参数返回

上级 856e241f
......@@ -122,9 +122,9 @@
- (GCDWebServerResponse *)getFileList: (GCDWebServerRequest *)request{
NSDictionary *query = request.query;
NSString *filePath = query[@"filePath"];
NSString *dirPath = query[@"dirPath"];
NSString *rootPath = NSHomeDirectory();
NSString *targetPath = [NSString stringWithFormat:@"%@%@",rootPath,filePath];
NSString *targetPath = [NSString stringWithFormat:@"%@%@",rootPath,dirPath];
NSMutableArray *files = @[].mutableCopy;
NSError *error = nil;
......@@ -135,8 +135,9 @@
[_fm fileExistsAtPath:fullPath isDirectory:&isDir];
NSMutableDictionary *dic = [[NSMutableDictionary alloc] init];
dic[@"isRootPath"] = [path isEqualToString:rootPath] ? @YES : @NO;
dic[@"fileName"] = path;
dic[@"filePath"] = [self getRelativeFilePath:fullPath];
dic[@"fileUrl"] = [self getRelativeFilePath:fullPath];
if (isDir) {
dic[@"fileType"] = @"folder";
}else{
......@@ -150,7 +151,7 @@
}
NSMutableDictionary *data = [[NSMutableDictionary alloc] init];
[data setValue:filePath forKey:@"filePath"];
[data setValue:dirPath forKey:@"dirPath"];
[data setValue:[DoraemonAppInfoUtil uuid] forKey:@"deviceId"];
[data setValue:files forKey:@"fileList"];
......
......@@ -728,7 +728,7 @@
INFOPLIST_FILE = DoraemonKitDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = yixiang.DoraemonKitDemoYIXIANXXX;
PRODUCT_BUNDLE_IDENTIFIER = com.didi.dokit.demo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
TARGETED_DEVICE_FAMILY = "1,2";
......@@ -749,7 +749,7 @@
INFOPLIST_FILE = DoraemonKitDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = yixiang.DoraemonKitDemoYIXIANXXX;
PRODUCT_BUNDLE_IDENTIFIER = com.didi.dokit.demo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
TARGETED_DEVICE_FAMILY = "1,2";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册