Last active
August 12, 2022 18:14
-
-
Save sebastianschramm/2c59e498e7120bf90b158f5bcaaaa794 to your computer and use it in GitHub Desktop.
How to create a directory and all of it's parent directories if none or some of them do not exist yet?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
data_directory_path = Path('data/assets') | |
data_directory_path.mkdir(parents=True, exist_ok=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment