mirror of
https://gitee.com/willfree/folder-file-manager.git
synced 2026-06-07 16:39:45 +08:00
14 lines
382 B
Python
14 lines
382 B
Python
import os
|
|
|
|
|
|
def mkdir(path):
|
|
folder = os.path.exists(path)
|
|
if not folder: # 判断是否存在文件夹如果不存在则创建为文件夹
|
|
os.makedirs(path) # makedirs 创建文件时如果路径不存在会创建这个路径
|
|
print("--- Created folder success" + path + " ---")
|
|
else:
|
|
print("--- There is this folder: " + path + " ---")
|
|
|
|
|
|
|