📜  在 python overwright existing 中创建文件夹 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:21.546000             🧑  作者: Mango

代码示例1
import os
import shutil

path = 'path_to_my_folder'
if not os.path.exists(path):
    os.makedirs(path)
else:
    shutil.rmtree(path)           # Removes all the subdirectories!
    os.makedirs(path)