11
This commit is contained in:
1 parent
0ebdcf85f6
commit
6a06c3c8e7
1 file changed
+5
-1
+5
-1
@@ -146,7 +146,11 @@ def checkIsFinish(driver, pid, orderId,styleNumber):
|
|||||||
#清除指定文件夹下的所有文件
|
#清除指定文件夹下的所有文件
|
||||||
def clearFolder(folder):
|
def clearFolder(folder):
|
||||||
for file in os.listdir(folder):
|
for file in os.listdir(folder):
|
||||||
os.remove(os.path.join(folder, file))
|
#判断如果是文件夹,则整个删除
|
||||||
|
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