diff options
author | Senthil Kumaran <senthil@uthcode.com> | 2011-07-19 00:03:02 (GMT) |
---|---|---|
committer | Senthil Kumaran <senthil@uthcode.com> | 2011-07-19 00:03:02 (GMT) |
commit | ae4a78b0a8f1c280eee19018d7988063a34d1821 (patch) | |
tree | 44eeba91c6419ed6e71447eef9ed5bc88342742e | |
parent | 0e752dd3f850883f4bfef43f6d95eec835bb7bc6 (diff) | |
download | cpython-ae4a78b0a8f1c280eee19018d7988063a34d1821.zip cpython-ae4a78b0a8f1c280eee19018d7988063a34d1821.tar.gz cpython-ae4a78b0a8f1c280eee19018d7988063a34d1821.tar.bz2 |
Fix closes issue12577 - clarify shutil.move documentation. Patch suggestion by Catalin Iacob
-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 1a878d5..1f194a0 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*. .. exception:: Error |