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.

17 lines
353B

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