2025-04-24 17:06:14 -04:00
|
|
|
import os
|
|
|
|
|
2025-07-22 20:01:22 +07:00
|
|
|
|
2025-04-24 17:06:14 -04:00
|
|
|
def check_for_config_folder():
|
2025-07-22 20:01:22 +07:00
|
|
|
if os.path.isdir(f"{os.getcwd()}/configs"):
|
2025-04-24 17:06:14 -04:00
|
|
|
return
|
|
|
|
else:
|
2025-07-22 20:01:22 +07:00
|
|
|
os.mkdir(f"{os.getcwd()}/configs")
|
2025-04-24 17:06:14 -04:00
|
|
|
return
|
|
|
|
|
2025-07-22 20:01:22 +07:00
|
|
|
|
2025-04-24 17:06:14 -04:00
|
|
|
def check_for_database_folder():
|
2025-07-22 20:01:22 +07:00
|
|
|
if os.path.isdir(f"{os.getcwd()}/databases"):
|
2025-04-24 17:06:14 -04:00
|
|
|
return
|
|
|
|
else:
|
2025-07-22 20:01:22 +07:00
|
|
|
os.mkdir(f"{os.getcwd()}/databases")
|
|
|
|
os.mkdir(f"{os.getcwd()}/databases/sql")
|
2025-04-24 17:06:14 -04:00
|
|
|
return
|
|
|
|
|
2025-07-22 20:01:22 +07:00
|
|
|
|
2025-04-24 17:06:14 -04:00
|
|
|
def check_for_cdm_folder():
|
2025-07-22 20:01:22 +07:00
|
|
|
if os.path.isdir(f"{os.getcwd()}/configs/CDMs"):
|
2025-04-24 17:06:14 -04:00
|
|
|
return
|
|
|
|
else:
|
2025-07-22 20:01:22 +07:00
|
|
|
os.mkdir(f"{os.getcwd()}/configs/CDMs")
|
2025-04-24 17:06:14 -04:00
|
|
|
return
|
|
|
|
|
2025-07-22 20:01:22 +07:00
|
|
|
|
2025-04-24 17:06:14 -04:00
|
|
|
def check_for_wv_cdm_folder():
|
2025-07-22 20:01:22 +07:00
|
|
|
if os.path.isdir(f"{os.getcwd()}/configs/CDMs/WV"):
|
2025-04-24 17:06:14 -04:00
|
|
|
return
|
|
|
|
else:
|
2025-07-22 20:01:22 +07:00
|
|
|
os.mkdir(f"{os.getcwd()}/configs/CDMs/WV")
|
2025-04-24 17:06:14 -04:00
|
|
|
return
|
|
|
|
|
2025-07-22 20:01:22 +07:00
|
|
|
|
2025-04-24 17:06:14 -04:00
|
|
|
def check_for_cdm_pr_folder():
|
2025-07-22 20:01:22 +07:00
|
|
|
if os.path.isdir(f"{os.getcwd()}/configs/CDMs/PR"):
|
2025-04-24 17:06:14 -04:00
|
|
|
return
|
|
|
|
else:
|
2025-07-22 20:01:22 +07:00
|
|
|
os.mkdir(f"{os.getcwd()}/configs/CDMs/PR")
|
2025-04-24 17:06:14 -04:00
|
|
|
return
|
|
|
|
|
2025-07-22 20:01:22 +07:00
|
|
|
|
2025-04-24 17:06:14 -04:00
|
|
|
def folder_checks():
|
|
|
|
check_for_config_folder()
|
|
|
|
check_for_database_folder()
|
|
|
|
check_for_cdm_folder()
|
|
|
|
check_for_wv_cdm_folder()
|
2025-07-22 20:01:22 +07:00
|
|
|
check_for_cdm_pr_folder()
|