]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Moshe Zadka <mzadka@geocities.com>:
authorFred Drake <fdrake@acm.org>
Mon, 31 Jul 2000 15:45:46 +0000 (15:45 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 31 Jul 2000 15:45:46 +0000 (15:45 +0000)
Document new method in shutil (copyfileobj).
Minor clarification by Fred.

Doc/lib/libshutil.tex

index 5da3a0e196f413750e60b7ab58f62087a0d19d66..ad96bd38bdeee3545eab976c39a8074e249880c8 100644 (file)
@@ -23,6 +23,15 @@ file type and creator codes will not be correct.
   it will be replaced, otherwise it will be created.
 \end{funcdesc}
 
+\begin{funcdesc}{copyfileobj}{fsrc, fdst\optional{, length}}
+  Copy the contents of the file-like object \var{fsrc} to the
+  file-like object \var{fdst}.  The integer \var{length}, if given,
+  is the buffer size. In particular, a negative \var{length} value
+  means to copy the data without looping over the source data in
+  chunks; by default the data is read in chunks to avoid uncontrolled
+  memory consumption.
+\end{funcdesc}
+
 \begin{funcdesc}{copymode}{src, dst}
   Copy the permission bits from \var{src} to \var{dst}.  The file
   contents, owner, and group are unaffected.