}else{
basePathDir = projectDir;
}
if(projectTemplateDirectoryName!=null && !projectTemplateDirectoryName.equals("")){
IProjectTemplatesManager projectTemplatesManager = ServerManager.getServerManager().getProjectTemplatesManager();
IStorage projectTemplatesDirectory = projectTemplatesManager.getProjectTemplatesDirectory();
IStorage templateDir = projectTemplatesDirectory.newInstance(projectTemplatesDirectory, projectTemplateDirectoryName);
if(templateDir.exists()) {
IStorage[] files = templateDir.listFiles();
for (int i = 0; i < files.length; i++) {
IStorage file = files[i];