@Override public void execute( FsService fsService, HttpServletRequest request, ServletContext servletContext, JSONObject json) throws Exception { String target = request.getParameter("target"); FsItemEx fsi = super.findItem(fsService, target); InputStream is = fsi.openInputStream(); String content = IOUtils.toString(is, "utf-8"); is.close(); json.put("content", content); }
@Override public void execute( FsService fsService, HttpServletRequest request, ServletContext servletContext, JSONObject json) throws Exception { String target = request.getParameter("target"); String name = request.getParameter("name"); FsItemEx fsi = super.findItem(fsService, target); FsItemEx dir = new FsItemEx(fsi, name); dir.createFolder(); json.put("added", new Object[] {getFsItemInfo(request, dir)}); }