mirror of
https://github.com/python/cpython.git
synced 2025-09-27 02:39:58 +00:00
#2369: clarify that copyfile() doesn't take a target directory.
This commit is contained in:
parent
734de68dd5
commit
786ead684a
1 changed files with 11 additions and 9 deletions
|
@ -28,15 +28,6 @@ copying and removal. For operations on individual files, see also the
|
||||||
are not copied.
|
are not copied.
|
||||||
|
|
||||||
|
|
||||||
.. function:: copyfile(src, dst)
|
|
||||||
|
|
||||||
Copy the contents (no metadata) of the file named *src* to a file named *dst*.
|
|
||||||
The destination location must be writable; otherwise, an :exc:`IOError` exception
|
|
||||||
will be raised. If *dst* already exists, it will be replaced. Special files
|
|
||||||
such as character or block devices and pipes cannot be copied with this
|
|
||||||
function. *src* and *dst* are path names given as strings.
|
|
||||||
|
|
||||||
|
|
||||||
.. function:: copyfileobj(fsrc, fdst[, length])
|
.. function:: copyfileobj(fsrc, fdst[, length])
|
||||||
|
|
||||||
Copy the contents of the file-like object *fsrc* to the file-like object *fdst*.
|
Copy the contents of the file-like object *fsrc* to the file-like object *fdst*.
|
||||||
|
@ -48,6 +39,17 @@ copying and removal. For operations on individual files, see also the
|
||||||
be copied.
|
be copied.
|
||||||
|
|
||||||
|
|
||||||
|
.. function:: copyfile(src, dst)
|
||||||
|
|
||||||
|
Copy the contents (no metadata) of the file named *src* to a file named *dst*.
|
||||||
|
*dst* must be the complete target file name; look at :func:`copy` for a copy that
|
||||||
|
accepts a target directory path.
|
||||||
|
The destination location must be writable; otherwise, an :exc:`IOError` exception
|
||||||
|
will be raised. If *dst* already exists, it will be replaced. Special files
|
||||||
|
such as character or block devices and pipes cannot be copied with this
|
||||||
|
function. *src* and *dst* are path names given as strings.
|
||||||
|
|
||||||
|
|
||||||
.. function:: copymode(src, dst)
|
.. function:: copymode(src, dst)
|
||||||
|
|
||||||
Copy the permission bits from *src* to *dst*. The file contents, owner, and
|
Copy the permission bits from *src* to *dst*. The file contents, owner, and
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue