diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2011-07-19 00:03:55 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2011-07-19 00:03:55 (GMT) |
commit | a8713b141ab1d060bd0ba0c9e6aa93dd476bb224 (patch) | |
tree | f709b97f6404a3534a9b20232a44545dedf592c5 /Doc/library/shutil.rst | |
parent | 6d175b72b5a50936e005e19aca38957a0756e3ec (diff) | |
parent | ae4a78b0a8f1c280eee19018d7988063a34d1821 (diff) | |
download | cpython-a8713b141ab1d060bd0ba0c9e6aa93dd476bb224.zip cpython-a8713b141ab1d060bd0ba0c9e6aa93dd476bb224.tar.gz cpython-a8713b141ab1d060bd0ba0c9e6aa93dd476bb224.tar.bz2 |
merge from 3.2 - Fix closes issue12577 - clarify shutil.move documentation. Patch suggestion by Catalin Iacob
Diffstat (limited to 'Doc/library/shutil.rst')
-rw-r--r-- | Doc/library/shutil.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index 88c0eaa..f8a1b60 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -161,8 +161,10 @@ Directory and files operations Recursively move a file or directory to another location. - If the destination is on the current filesystem, then simply use rename. - Otherwise, copy src (with :func:`copy2`) to the dst and then remove src. + Uses :func:`os.rename` to perform the move. If it fails, for reasons such as + when *src* and *dst* are on different filesystems or in case of windows where + rename is not supported when *dst* exists, fallback to copying *src* (with + :func:`copy2`) to the *dst* and then remove *src*. .. function:: disk_usage(path) |