- def removeDir(dirPath):
- '''
- Created by Wu Yongcong 2017-8-18
- :param dirPath:
- :return:
- '''
- if not os.path.exists(dirPath):
- raise FileException("input error!not exist dirPath")
- else:
- shutil.rmtree(dirPath)
- def mkdirPath(dirPath):
- '''
- :param dirPath:
- :return:
- Created by Wu Yongcong 2017-8-18
- 递归创建输入的路径下面的文件夹或文件
- '''
- if os.path.exists(dirPath):
- raise FileException("input error!the dirPath is exist")
- else:
- os.makedirs(dirPath)