(path)
| 13 | logger = logger_factory.setup_logger('io_file') |
| 14 | |
| 15 | def create_if_not_exist(path): |
| 16 | if not os.path.exists(os.path.dirname(path)): # 如果目录不存在,递归创建该目录 |
| 17 | os.makedirs(path, exist_ok=True) |
| 18 | |
| 19 | |
| 20 | def read(file_path, chunk_size=1024*1024*10000, line_threshold=1000000, encoding='utf-8'): |