프로젝트 생성 시 이미 해당 파일이 존재 하는지 확인하는 기능

This commit is contained in:
정영민
2025-06-11 16:39:39 +09:00
parent 131c8d28e3
commit 3eed27c15d
2 changed files with 25 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ namespace Studio.UI
var projectName = GetProjectName();
var projectPath = GetProjectRoute();
if (!IsProjectNameVaild(projectName) || !IsProjectPathVaild(projectPath))
if (!IsProjectNameVaild(projectName) || !IsProjectPathVaild(projectPath) || !IsProjectExistVaild())
{
return;
}
@@ -95,6 +95,17 @@ namespace Studio.UI
}
return true;
}
private bool IsProjectExistVaild()
{
var projectPath = InputField_ProjectRoute.text;
var projectNameAndExtension = $"{InputField_ProjectName.text}.ocs";
var filePath = Path.Combine(projectPath, projectNameAndExtension);
if (File.Exists(filePath))
{
return false;
}
return true;
}
}
}

View File

@@ -41,7 +41,7 @@ namespace Studio.UI
var projectName = GetProjectName();
var projectPath = GetProjectRoute();
if (!IsProjectNameVaild(projectName) || !IsProjectPathVaild(projectPath))
if (!IsProjectNameVaild(projectName) || !IsProjectPathVaild(projectPath) || IsProjectExistVaild())
{
return;
}
@@ -87,5 +87,17 @@ namespace Studio.UI
}
return true;
}
private bool IsProjectExistVaild()
{
var projectPath = InputField_ProjectRoute.text;
var projectNameAndExtension = $"{InputField_ProjectName.text}.ocs";
var filePath = Path.Combine(projectPath, projectNameAndExtension);
if (File.Exists(filePath))
{
return false;
}
return true;
}
}
}