xlsx-dir-map/xlsx_dir_map/directory.py

11 lines
282 B
Python
Raw Normal View History

2022-01-24 01:50:27 +00:00
import os
from pathlib import Path
def create_directory(name):
Path(name).mkdir(parents=True, exist_ok=True)
def create_directories(outdir, paths):
for path in paths:
fullpath = f"{outdir}/{path}" if outdir is not None else path
create_directory(fullpath)