11
This commit is contained in:
1 parent
0ebdcf85f6
commit
6a06c3c8e7
1 file changed
+4
@@ -146,6 +146,10 @@ def checkIsFinish(driver, pid, orderId,styleNumber):
|
||||
#清除指定文件夹下的所有文件
|
||||
def clearFolder(folder):
|
||||
for file in os.listdir(folder):
|
||||
#判断如果是文件夹,则整个删除
|
||||
if os.path.isdir(os.path.join(folder, file)):
|
||||
shutil.rmtree(os.path.join(folder, file))
|
||||
else:
|
||||
os.remove(os.path.join(folder, file))
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user