|
- # -*- coding: utf-8 -*-
- from os import makedirs
- from os.path import exists, join
-
- from loguru import logger
-
- '''
- 文件处理工具类
- '''
-
-
- def create_dir_not_exist(base_dir, file_path):
- path = join(base_dir, file_path)
- if not exists(path):
- logger.info("开始创建文件夹: {}", path)
- makedirs(path)
- logger.info("文件夹创建完成 {}", path)
|