mirror of
https://github.com/python/cpython.git
synced 2025-09-30 20:31:52 +00:00
Fix-up documentation of makedirs().
This commit is contained in:
parent
5a22b65117
commit
c1673681fd
1 changed files with 5 additions and 5 deletions
|
@ -1143,7 +1143,7 @@ Files and Directories
|
||||||
Availability: Unix, Windows.
|
Availability: Unix, Windows.
|
||||||
|
|
||||||
|
|
||||||
.. function:: makedirs(path[, mode][, exist_ok=False])
|
.. function:: makedirs(path, mode=0o777, exist_ok=False)
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
single: directory; creating
|
single: directory; creating
|
||||||
|
@ -1151,17 +1151,17 @@ Files and Directories
|
||||||
|
|
||||||
Recursive directory creation function. Like :func:`mkdir`, but makes all
|
Recursive directory creation function. Like :func:`mkdir`, but makes all
|
||||||
intermediate-level directories needed to contain the leaf directory. If
|
intermediate-level directories needed to contain the leaf directory. If
|
||||||
the target directory with the same mode as we specified already exists,
|
the target directory with the same mode as specified already exists,
|
||||||
raises an :exc:`OSError` exception if *exist_ok* is False, otherwise no
|
raises an :exc:`OSError` exception if *exist_ok* is False, otherwise no
|
||||||
exception is raised. If the directory cannot be created in other cases,
|
exception is raised. If the directory cannot be created in other cases,
|
||||||
raises an :exc:`OSError` exception. The default *mode* is ``0o777`` (octal).
|
raises an :exc:`OSError` exception. The default *mode* is ``0o777`` (octal).
|
||||||
On some systems, *mode* is ignored. Where it is used, the current umask
|
On some systems, *mode* is ignored. Where it is used, the current umask
|
||||||
value is first masked out.
|
value is first masked out.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
:func:`makedirs` will become confused if the path elements to create include
|
:func:`makedirs` will become confused if the path elements to create
|
||||||
:data:`os.pardir`.
|
include :data:`pardir`.
|
||||||
|
|
||||||
This function handles UNC paths correctly.
|
This function handles UNC paths correctly.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue