You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
386B

  1. # -*- coding: utf-8 -*-
  2. from os import makedirs
  3. from os.path import exists, join
  4. from loguru import logger
  5. '''
  6. 文件处理工具类
  7. '''
  8. def create_dir_not_exist(base_dir, file_path):
  9. path = join(base_dir, file_path)
  10. if not exists(path):
  11. logger.info("开始创建文件夹: {}", path)
  12. makedirs(path)
  13. logger.info("文件夹创建完成 {}", path)