FrameServletHandler.java 文件源码

java
阅读 36 收藏 0 点赞 0 评论 0

项目:urule 作者:
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);
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号