mkdir

mkdir(path, ensure_exists=True)[source]

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

Parameters:
  • path (Path) – The path to a directory

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

Return type:

None