mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Issue #24617: Add comment for os.mkdir about mode quirks
This commit is contained in:
parent
39b1025356
commit
63b91e5403
1 changed files with 10 additions and 4 deletions
|
@ -1623,9 +1623,15 @@ features:
|
|||
|
||||
Create a directory named *path* with numeric mode *mode*.
|
||||
|
||||
If the directory already exists, :exc:`FileExistsError` is raised.
|
||||
|
||||
.. _mkdir_modebits:
|
||||
|
||||
On some systems, *mode* is ignored. Where it is used, the current umask
|
||||
value is first masked out. If the directory already exists,
|
||||
:exc:`FileExistsError` is raised.
|
||||
value is first masked out. If bits other than the last 9 (i.e. the last 3
|
||||
digits of the octal representation of the *mode*) are set, their meaning is
|
||||
platform-dependent. On some platforms, they are ignored and you should call
|
||||
:func:`chmod` explicitly to set them.
|
||||
|
||||
This function can also support :ref:`paths relative to directory descriptors
|
||||
<dir_fd>`.
|
||||
|
@ -1646,8 +1652,8 @@ features:
|
|||
Recursive directory creation function. Like :func:`mkdir`, but makes all
|
||||
intermediate-level directories needed to contain the leaf directory.
|
||||
|
||||
The default *mode* is ``0o777`` (octal). On some systems, *mode* is
|
||||
ignored. Where it is used, the current umask value is first masked out.
|
||||
The *mode* parameter is passed to :func:`mkdir`; see :ref:`the mkdir()
|
||||
description <mkdir_modebits>` for how it is interpreted.
|
||||
|
||||
If *exist_ok* is ``False`` (the default), an :exc:`OSError` is raised if the
|
||||
target directory already exists.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue