mirror of https://gitee.com/a529548204/apitest.git
24 lines
479 B
Python
24 lines
479 B
Python
# coding:utf-8
|
|
import os
|
|
import shutil
|
|
|
|
|
|
def setdir(filepath):
|
|
"""
|
|
如果文件夹不存在就创建,如果文件存在就清空!
|
|
:param filepath:需要创建的文件夹路径
|
|
:return:
|
|
"""
|
|
shutil.rmtree(filepath)
|
|
|
|
|
|
# def cleanReport()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
# setDir(r'D:\api_t\report\xml\temp')
|
|
l = os.listdir(r'D:\apitest\report\html')
|
|
betime = 60 * 60 * 24 * 7
|
|
t = os.path.getmtime(r'D:\apitest\report\html')
|
|
print(l, t)
|