summaryrefslogtreecommitdiffstats
path: root/Doc/library/os.rst
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2007-11-30 21:11:28 (GMT)
committerChristian Heimes <christian@cheimes.de>2007-11-30 21:11:28 (GMT)
commit3628187b66287bdeb8c3c323092bf17e714e68de (patch)
tree269471b6c5a302d00196e483e2ceb132533ef389 /Doc/library/os.rst
parentdafd32b730c246b76a28e4089253e3a2b614df58 (diff)
downloadcpython-3628187b66287bdeb8c3c323092bf17e714e68de.zip
cpython-3628187b66287bdeb8c3c323092bf17e714e68de.tar.gz
cpython-3628187b66287bdeb8c3c323092bf17e714e68de.tar.bz2
Fix for feature request #1528 Add os.fchmod
Georg Brandl has added fchmod() and fchown(). I've contributed lchown but I'm not able to test it on Linux. However it should be available on Mac and some other flavors of Unix. I've made a quick test of fchmod() and fchown() on my system. They are working as expected.
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r--Doc/library/os.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 7d12488..4904ea0 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -523,6 +523,19 @@ by file descriptors.
Availability: Macintosh, Unix, Windows.
+.. function:: fchmod(fd, mode)
+
+ Change the mode of the file given by *fd* to the numeric *mode*. See the docs
+ for :func:`chmod` for possible values of *mode*. Availability: Unix.
+
+
+.. function:: fchown(fd, uid, gid)
+
+ Change the owner and group id of the file given by *fd* to the numeric *uid*
+ and *gid*. To leave one of the ids unchanged, set it to -1.
+ Availability: Unix.
+
+
.. function:: fdatasync(fd)
Force write of file with filedescriptor *fd* to disk. Does not force update of
@@ -581,6 +594,13 @@ by file descriptors.
tty(-like) device, else ``False``. Availability: Macintosh, Unix.
+.. function:: lchmod(path, mode)
+
+ Change the mode of *path* to the numeric *mode*. If path is a symlink, this
+ affects the symlink rather than the target. See the docs for :func:`chmod`
+ for possible values of *mode*. Availability: Unix.
+
+
.. function:: lseek(fd, pos, how)
Set the current position of file descriptor *fd* to position *pos*, modified by