xlsx-dir-map/xlsx_dir_map/directory.py

11 lines
282 B
Python

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)