Browse Source

Merge pull request #182 in BA/design from ~SHINE/design:dev to dev

* commit 'b56f76777df12fb6a491136e8efc2ebf12287e73':
  update
  远程设计地图资源
master
superman 8 years ago
parent
commit
2cc3e91cde
  1. 19
      designer_base/src/com/fr/env/RemoteEnv.java

19
designer_base/src/com/fr/env/RemoteEnv.java vendored

@ -847,7 +847,6 @@ public class RemoteEnv implements Env {
* @return 成功新建返回true
* @throws Exception
*/
@Override
public boolean createFile(String filePath) throws Exception {
HashMap<String, String> para = new HashMap<String, String>();
para.put("op", "fr_remote_design");
@ -864,6 +863,23 @@ public class RemoteEnv implements Env {
return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8));
}
public boolean renameFile(String newPath, String oldPath) throws Exception {
HashMap<String, String> para = new HashMap<String, String>();
para.put("op", "fr_remote_design");
para.put("cmd", "design_rename_file");
para.put("newPath", newPath);
para.put("oldPath", oldPath);
HttpClient client = createHttpMethod(para);
InputStream input = execute4InputStream(client);
if (input == null) {
return false;
}
return Boolean.valueOf(IOUtils.inputStream2String(input, EncodeConstants.ENCODING_UTF_8));
}
/**
* 判断文件是否存在
*
@ -942,7 +958,6 @@ public class RemoteEnv implements Env {
public void stopUserCheckTimer() {
}
/**
* 删除文件
*

Loading…
Cancel
Save