{"title":"新建文件","inframe":false,"hidden":false,"roles":{"dev":1},"pageLink":"","children":[{"configs":{"serverScript":"var params = app.get(),\n  file = new File(params.path, params.name),\n  isDir = Wb.parseBool(params.isDir),\n  created;\n\nif (file.exists())\n  Wb.error('\u201c' + params.name + '\u201d 已经存在。');\nif (isDir)\n  created = file.mkdir();\nelse\n  created = file.createNewFile();\nif (!created)\n  Wb.error('创建 \u201c' + params.name + '\u201d 失败。');\napp.send({\n  icon: isDir ? null : WebUtil.encode(FileUtil.getPath(file)),\n  type: FileUtil.getFileType(file),\n  date: new Date(file.lastModified()),\n  size: isDir ? null : file.length()\n});","itemId":"module"},"children":[],"type":"module","expanded":false}],"iconCls":""}