public void copyFile(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String newFullPath=req.getParameter("newFullPath");
String oldFullPath=req.getParameter("oldFullPath");
newFullPath=Utils.decodeURL(newFullPath);
oldFullPath=Utils.decodeURL(oldFullPath);
try{
InputStream inputStream=repositoryService.readFile(oldFullPath, null);
String content=IOUtils.toString(inputStream, "utf-8");
inputStream.close();
User user=EnvironmentUtils.getLoginUser(new RequestContext(req,resp));
repositoryService.createFile(newFullPath, content,user);
loadProjects(req, resp);
}catch(Exception ex){
throw new RuleException(ex);
}
}
FrameServletHandler.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:urule
作者:
评论列表
文章目录