最初删除文件夹的函数如下:
def del_file_or_folder(self, file_path):
if os.path.exists(file_path):
try:
if os.path.isdir(file_path):
shutil.rmtree
最初删除文件夹的函数如下:
def del_file_or_folder(self, file_path):
if os.path.exists(file_path):
try:
if os.path.isdir(file_path):
shutil.rmtree