diff options
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/os.rst | 3 | ||||
-rw-r--r-- | Doc/library/shutil.rst | 14 |
2 files changed, 17 insertions, 0 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 47e6a1b..0c5c40c 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1530,6 +1530,9 @@ Files and Directories Change the owner and group id of *path* to the numeric *uid* and *gid*. To leave one of the ids unchanged, set it to -1. + See :func:`shutil.chown` for a higher-level function that accepts names in + addition to numeric ids. + Availability: Unix. diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index 0d80913..d87e605 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -183,6 +183,20 @@ Directory and files operations Availability: Unix, Windows. +.. function:: chown(path, user=None, group=None) + + Change owner *user* and/or *group* of the given *path*. + + *user* can be a system user name or a uid; the same applies to *group*. At + least one argument is required. + + See also :func:`os.chown`, the underlying function. + + Availability: Unix. + + .. versionadded:: 3.3 + + .. exception:: Error This exception collects exceptions that are raised during a multi-file |