Commit 324ab75c by 冯硕楠 Committed by GitHub

Merge pull request #2 from olunx/master

生成代码模块兼容三大平台
parents 9fb7ef08 2a33e24f
......@@ -54,10 +54,10 @@ public abstract class GunsTemplateEngine extends AbstractTemplateEngine {
public void generateFile(String template,String filePath){
Template pageTemplate = groupTemplate.getTemplate(template);
configTemplate(pageTemplate);
if(PlatformUtil.isLinux()){
filePath = filePath.replaceAll("/+|\\\\+","/");
}else{
if(PlatformUtil.isWindows()){
filePath = filePath.replaceAll("/+|\\\\+","\\\\");
}else{
filePath = filePath.replaceAll("/+|\\\\+","/");
}
File file = new File(filePath);
File parentFile = file.getParentFile();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment