2023-08-12 00:37:05 +08:00
|
|
|
from os import mkdir as raw_mkdir
|
2023-08-09 14:36:46 +08:00
|
|
|
from os.path import exists
|
|
|
|
|
|
|
|
INIT_DIRECTORIES = [
|
|
|
|
'out'
|
|
|
|
]
|
|
|
|
|
2023-08-12 00:37:05 +08:00
|
|
|
def mkdir(dirpath: str) -> bool:
|
|
|
|
if not exists(dirpath):
|
|
|
|
raw_mkdir(dirpath)
|
|
|
|
|
|
|
|
return [True if exists(dirpath) else False][0]
|
|
|
|
|
|
|
|
|
2023-08-09 14:36:46 +08:00
|
|
|
def init_directories():
|
|
|
|
for dir_name in INIT_DIRECTORIES:
|
2023-08-12 00:37:05 +08:00
|
|
|
mkdir(dir_name)
|