diff options
| author | Senthil Kumaran <senthil@uthcode.com> | 2011-07-19 00:05:44 (GMT) |
|---|---|---|
| committer | Senthil Kumaran <senthil@uthcode.com> | 2011-07-19 00:05:44 (GMT) |
| commit | 60bf489e8aab38519cbc5c9683574d01a52e5c65 (patch) | |
| tree | 7eed83e2edc2a6a813f9f5f2e2c45cb94238086a | |
| parent | 711cb58db12e86b0108076dd88d8f0ad48f53e95 (diff) | |
| download | cpython-60bf489e8aab38519cbc5c9683574d01a52e5c65.zip cpython-60bf489e8aab38519cbc5c9683574d01a52e5c65.tar.gz cpython-60bf489e8aab38519cbc5c9683574d01a52e5c65.tar.bz2 | |
merge from 3.2 - 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 1b160d8..ed622ad 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -163,8 +163,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*. .. versionadded:: 2.3 |
