Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
0230b6af
Commit
0230b6af
authored
Oct 07, 2012
by
Hynek Schlawack
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#13498: Clarify docs of os.makedirs()'s exist_ok argument.
Done with great native-speaker help from R. David Murray.
parent
83fe2e1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
8 deletions
+14
-8
Doc/library/os.rst
Doc/library/os.rst
+11
-8
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Doc/library/os.rst
View file @
0230b6af
...
...
@@ -1183,18 +1183,21 @@ Files and Directories
single: UNC paths; and os.makedirs()
Recursive directory creation function. Like :func:`mkdir`, but makes all
intermediate-level directories needed to contain the leaf directory. If
the target directory with the same mode as specified already exists,
raises an :exc:`OSError` exception if *exist_ok* is False, otherwise no
exception is raised. If the directory cannot be created in other cases,
raises an :exc:`OSError` exception. The default *mode* is ``0o777`` (octal).
On some systems, *mode* is ignored. Where it is used, the current umask
value is first masked out.
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.
If *exists_ok* is ``False`` (the default), an :exc:`OSError` is raised if
the target directory already exists. If *exists_ok* is ``True`` an
:exc:`OSError` is still raised if the umask-masked *mode* is different from
the existing mode, on systems where the mode is used. :exc:`OSError` will
also be raised if the directory creation fails.
.. note::
:func:`makedirs` will become confused if the path elements to create
include :data:`pardir`.
include :data:`pardir`
(eg. ".." on UNIX systems)
.
This function handles UNC paths correctly.
...
...
Misc/NEWS
View file @
0230b6af
...
...
@@ -609,6 +609,9 @@ Build
Documentation
-------------
- Issue #13498: Clarify docs of os.makedirs()'s exist_ok argument. Done with
great native-speaker help from R. David Murray.
- Issue #15533: Clarify docs and add tests for subprocess.Popen()'s cwd
argument.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment