Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Doc/library/pathlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -994,9 +994,9 @@ call fails (for example because the path doesn't exist).
If *exist_ok* is false (the default), :exc:`FileExistsError` is
raised if the target directory already exists.

If *exist_ok* is true, :exc:`FileExistsError` exceptions will be
ignored (same behavior as the POSIX ``mkdir -p`` command), but only if the
last path component is not an existing non-directory file.
If *exist_ok* is true, :exc:`FileExistsError` will not be raised unless the given
path already exists in the file system and is not a directory (same
behavior as the POSIX ``mkdir -p`` command).

.. versionchanged:: 3.5
The *exist_ok* parameter was added.
Expand Down