| --- a/Doc/library/shutil.rst Sun Jul 01 12:24:20 2012 +0200 |
| +++ b/Doc/library/shutil.rst Mon Jul 02 18:43:37 2012 +0300 |
| @@ -47,7 +47,7 @@ |
| be copied. |
| -.. function:: copyfile(src, dst, symlinks=False) |
| +.. function:: copyfile(src, dst, *, follow_symlinks=True) |
| Copy the contents (no metadata) of the file named *src* to a file named |
| *dst* and return *dst*. *dst* must be the complete target file name; look at |
| @@ -59,63 +59,63 @@ |
| such as character or block devices and pipes cannot be copied with this |
| function. *src* and *dst* are path names given as strings. |
| - If *symlinks* is true and *src* is a symbolic link, a new symbolic link will |
| + If *follow_symlinks* is false and *src* is a symbolic link, a new symbolic link will |
| be created instead of copying the file *src* points to. |
| .. versionchanged:: 3.3 |
| :exc:`IOError` used to be raised instead of :exc:`OSError`. |
| - Added *symlinks* argument. |
| + Added *follow_symlinks* argument. |
| .. versionchanged:: 3.3 |
| Added return of the *dst*. |
| -.. function:: copymode(src, dst, symlinks=False) |
| +.. function:: copymode(src, dst, *, follow_symlinks=True) |
| Copy the permission bits from *src* to *dst*. The file contents, owner, and |
| group are unaffected. *src* and *dst* are path names given as strings. If |
| - *symlinks* is true, *src* a symbolic link and the operating system supports |
| + *follow_symlinks* is false, *src* a symbolic link and the operating system supports |
| modes for symbolic links (for example BSD-based ones), the mode of the link |
| will be copied. |
| .. versionchanged:: 3.3 |
| - Added *symlinks* argument. |
| + Added *follow_symlinks* argument. |
| -.. function:: copystat(src, dst, symlinks=False) |
| +.. function:: copystat(src, dst, *, follow_symlinks=True) |
| Copy the permission bits, last access time, last modification time, and flags |
| from *src* to *dst*. The file contents, owner, and group are unaffected. *src* |
| and *dst* are path names given as strings. If *src* and *dst* are both |
| - symbolic links and *symlinks* true, the stats of the link will be copied as |
| + symbolic links and *follow_symlinks* false, the stats of the link will be copied as |
| far as the platform allows. |
| .. versionchanged:: 3.3 |
| - Added *symlinks* argument. |
| + Added *follow_symlinks* argument. |
| -.. function:: copy(src, dst, symlinks=False) |
| +.. function:: copy(src, dst, *, follow_symlinks=True) |
| Copy the file *src* to the file or directory *dst* and return the file's |
| destination. If *dst* is a directory, a |
| file with the same basename as *src* is created (or overwritten) in the |
| directory specified. Permission bits are copied. *src* and *dst* are path |
| - names given as strings. If *symlinks* is true, symbolic links won't be |
| + names given as strings. If *follow_symlinks* is false, symbolic links won't be |
| followed but recreated instead -- this resembles GNU's :program:`cp -P`. |
| .. versionchanged:: 3.3 |
| - Added *symlinks* argument. |
| + Added *follow_symlinks* argument. |
| .. versionchanged:: 3.3 |
| Added return of the *dst*. |
| -.. function:: copy2(src, dst, symlinks=False) |
| +.. function:: copy2(src, dst, *, follow_symlinks=True) |
| Similar to :func:`shutil.copy`, including that the destination is |
| returned, but metadata is copied as well. This is |
| - similar to the Unix command :program:`cp -p`. If *symlinks* is true, |
| + similar to the Unix command :program:`cp -p`. If *follow_symlinks* is false, |
| symbolic links won't be followed but recreated instead -- this resembles |
| GNU's :program:`cp -P`. |
| .. versionchanged:: 3.3 |
| - Added *symlinks* argument, try to copy extended file system attributes |
| + Added *follow_symlinks* argument, try to copy extended file system attributes |
| too (currently Linux only). |
| .. versionchanged:: 3.3 |