复制templates
(modelType, newProjectType string)
| 60 | |
| 61 | // 复制templates |
| 62 | func CopyTemplateToCurrentDir(modelType, newProjectType string) { |
| 63 | if newProjectType == "" { |
| 64 | newProjectType = "_default" |
| 65 | } |
| 66 | templatePath := common.PathJoin(config.SmartIdeHome, TMEPLATE_DIR_NAME, modelType, newProjectType) |
| 67 | templatesFolderIsExist := common.IsExist(templatePath) |
| 68 | if !templatesFolderIsExist { |
| 69 | common.SmartIDELog.Error(i18nInstance.New.Info_type_no_exist) |
| 70 | } |
| 71 | folderPath, err := os.Getwd() |
| 72 | common.CheckError(err) |
| 73 | copyerr := copyDir(templatePath, folderPath) |
| 74 | common.CheckError(copyerr) |
| 75 | } |
| 76 | |
| 77 | /** |
| 78 | * 拷贝文件夹,同时拷贝文件夹中的文件 |
no test coverage detected