From: Senthil Kumaran Date: Tue, 19 Jul 2011 00:03:02 +0000 (+0800) Subject: Fix closes issue12577 - clarify shutil.move documentation. Patch suggestion by Catali... X-Git-Tag: v3.2.2rc1~95 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ae4a78b0a8f1c280eee19018d7988063a34d1821;p=thirdparty%2FPython%2Fcpython.git Fix closes issue12577 - clarify shutil.move documentation. Patch suggestion by Catalin Iacob --- diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index 1a878d5fd039..1f194a0779ee 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