diff options
author | Georg Brandl <georg@python.org> | 2008-04-19 16:57:43 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-04-19 16:57:43 +0000 |
commit | 786ead684abe71aa0d6e2fd0175d52e18337ca2e (patch) | |
tree | af2317669de952aba9e611bc64197431d6a19400 | |
parent | 734de68dd5caa64353a72143cd68deae27e7070b (diff) | |
download | cpython-git-786ead684abe71aa0d6e2fd0175d52e18337ca2e.tar.gz |
#2369: clarify that copyfile() doesn't take a target directory.
-rw-r--r-- | Doc/library/shutil.rst | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index 267435efa2..f28fbacfcd 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -28,15 +28,6 @@ copying and removal. For operations on individual files, see also the 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]) 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. +.. 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) Copy the permission bits from *src* to *dst*. The file contents, owner, and |