diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-08-05 13:18:02 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-08-05 13:18:02 (GMT) |
commit | 69a6ca5260b8f25d4fb6d1371b783bacbe04153d (patch) | |
tree | 49765914eb88b49620f615ec29a032d7190b5f39 /Doc/library/os.rst | |
parent | 415d0f5cd3b2bb95c4a4da2f6a43a186335ae1a1 (diff) | |
download | cpython-69a6ca5260b8f25d4fb6d1371b783bacbe04153d.zip cpython-69a6ca5260b8f25d4fb6d1371b783bacbe04153d.tar.gz cpython-69a6ca5260b8f25d4fb6d1371b783bacbe04153d.tar.bz2 |
os.unlinkat() has been removed, update os.fwalk() doc
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r-- | Doc/library/os.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 40c2887..dae5037 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -2248,7 +2248,7 @@ features: dirs.remove('CVS') # don't visit CVS directories In the next example, walking the tree bottom-up is essential: - :func:`unlinkat` doesn't allow deleting a directory before the directory is + :func:`rmdir` doesn't allow deleting a directory before the directory is empty:: # Delete everything reachable from the directory named in "top", @@ -2258,9 +2258,9 @@ features: import os for root, dirs, files, rootfd in os.fwalk(top, topdown=False): for name in files: - os.unlinkat(rootfd, name) + os.unlink(name, dir_fd=rootfd) for name in dirs: - os.unlinkat(rootfd, name, os.AT_REMOVEDIR) + os.rmdir(name, dir_fd=rootfd) Availability: Unix. |