diff --git a/designer_base/src/com/fr/env/RemoteEnv.java b/designer_base/src/com/fr/env/RemoteEnv.java index 7cff11c37..a779026ea 100644 --- a/designer_base/src/com/fr/env/RemoteEnv.java +++ b/designer_base/src/com/fr/env/RemoteEnv.java @@ -847,7 +847,6 @@ public class RemoteEnv implements Env { * @return 成功新建返回true * @throws Exception */ - @Override public boolean createFile(String filePath) throws Exception { HashMap para = new HashMap(); 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 para = new HashMap(); + 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() { } - /** * 删除文件 *