diff options
author | Hynek Schlawack <hs@ox.cx> | 2012-10-08 05:44:54 (GMT) |
---|---|---|
committer | Hynek Schlawack <hs@ox.cx> | 2012-10-08 05:44:54 (GMT) |
commit | 101591e9d52d3057bfafc01811ef215c3bf1745d (patch) | |
tree | b15f58236c8d86b00eff88c8b20b7b2b12f73fb2 /Doc/library/os.rst | |
parent | 042fa653ab91c05dfb50e227361ba345e45169c7 (diff) | |
parent | 0230b6af78c9059016df341dc94a4a09ccbe3881 (diff) | |
download | cpython-101591e9d52d3057bfafc01811ef215c3bf1745d.zip cpython-101591e9d52d3057bfafc01811ef215c3bf1745d.tar.gz cpython-101591e9d52d3057bfafc01811ef215c3bf1745d.tar.bz2 |
Merge 3.2
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r-- | Doc/library/os.rst | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 5f149cb..bf6087e 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1555,18 +1555,21 @@ features: 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. |