]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
merge from 3.2 - Fix closes issue12577 - clarify shutil.move documentation. Patch...
authorSenthil Kumaran <senthil@uthcode.com>
Tue, 19 Jul 2011 00:03:55 +0000 (08:03 +0800)
committerSenthil Kumaran <senthil@uthcode.com>
Tue, 19 Jul 2011 00:03:55 +0000 (08:03 +0800)
1  2 
Doc/library/shutil.rst

index 88c0eaa8db0269c70bd4f38ffa38bc08d87b48c3,1f194a0779ee882c11c7dd080805f4164430fac9..f8a1b60f6f33cd64a2fc13ee6eebbc6b771985cf
@@@ -161,17 -161,11 +161,19 @@@ Directory and files operation
  
     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)
 +
 +   Return disk usage statistics about the given path as a namedtuple including
 +   total, used and free space expressed in bytes.
 +
 +   .. versionadded:: 3.3
 +
 +   Availability: Unix, Windows.
  
  .. exception:: Error