diff options
| author | Senthil Kumaran <senthil@uthcode.com> | 2011-07-19 08:03:55 +0800 |
|---|---|---|
| committer | Senthil Kumaran <senthil@uthcode.com> | 2011-07-19 08:03:55 +0800 |
| commit | 2bbfb3ecde58e03846e6a816cf63ed78ea5eec35 (patch) | |
| tree | 5ae08742ea91c7c635b1ac69a09a0e552decdc6f /Doc | |
| parent | 1f86301f3084280169cfaa7e4472e27d0cbb8b13 (diff) | |
| parent | fa4f26cb26073d72d29196b89091ce61ce9677eb (diff) | |
| download | cpython-2bbfb3ecde58e03846e6a816cf63ed78ea5eec35.tar.gz | |
merge from 3.2 - Fix closes issue12577 - clarify shutil.move documentation. Patch suggestion by Catalin Iacob
Diffstat (limited to 'Doc')
| -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 88c0eaa8db..f8a1b60f6f 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) |
