mkdir

mkdir(path: Path, ensure_exists: bool = True) None[source]

Make a directory (or parent directory if a file is given) if flagged with ensure_exists.

Parameters:
  • path – The path to a directory

  • ensure_exists – Should the directories leading to the path be created if they don’t already exist?