diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-12-16 19:22:37 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-12-16 19:22:37 (GMT) |
commit | 0048c98fef96fa5df30db535bc124ee9aac341b0 (patch) | |
tree | 70c4cd0630369a5aef472813c185fa8e8466ae47 /Doc/library/pathlib.rst | |
parent | c274fd22edd2471b4f73f5cc690851cfbc716589 (diff) | |
download | cpython-0048c98fef96fa5df30db535bc124ee9aac341b0.zip cpython-0048c98fef96fa5df30db535bc124ee9aac341b0.tar.gz cpython-0048c98fef96fa5df30db535bc124ee9aac341b0.tar.bz2 |
Issue #19921: When Path.mkdir() is called with parents=True, any missing parent is created with the default permissions, ignoring the mode argument (mimicking the POSIX "mkdir -p" command).
Patch by Serhiy.
Diffstat (limited to 'Doc/library/pathlib.rst')
-rw-r--r-- | Doc/library/pathlib.rst | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index a8c1dc9..7148667 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -768,7 +768,10 @@ call fails (for example because the path doesn't exist): and access flags. If the path already exists, :exc:`OSError` is raised. If *parents* is true, any missing parents of this path are created - as needed. If *parents* is false (the default), a missing parent raises + as needed; they are created with the default permissions without taking + *mode* into account (mimicking the POSIX ``mkdir -p`` command). + + If *parents* is false (the default), a missing parent raises :exc:`OSError`. |