@@ -201,14 +201,27 @@ FTP objects
201201
202202 .. method :: FTP.retrbinary(cmd, callback, blocksize=8192, rest=None)
203203
204- Retrieve a file in binary transfer mode. *cmd * should be an appropriate
205- ``RETR `` command: ``'RETR filename' ``. The *callback * function is called for
206- each block of data received, with a single bytes argument giving the data
207- block. The optional *blocksize * argument specifies the maximum chunk size to
208- read on the low-level socket object created to do the actual transfer (which
209- will also be the largest size of the data blocks passed to *callback *). A
210- reasonable default is chosen. *rest * means the same thing as in the
211- :meth: `transfercmd ` method.
204+ Retrieve a file in binary transfer mode.
205+
206+ :param str cmd:
207+ An appropriate ``STOR `` command: :samp: `"STOR { filename } " `.
208+
209+ :param callback:
210+ A single parameter callable that is called
211+ for each block of data received,
212+ with its single argument being the data as :class: `bytes `.
213+ :type callback: :term: `callable `
214+
215+ :param int blocksize:
216+ The maximum chunk size to read on the low-level
217+ :class: `~socket.socket ` object created to do the actual transfer.
218+ This also corresponds to the largest size of data
219+ that will be passed to *callback *.
220+ Defaults to ``8192 ``.
221+
222+ :param int rest:
223+ A ``REST `` command to be sent to the server.
224+ See the documentation for the *rest * parameter of the :meth: `transfercmd ` method.
212225
213226
214227 .. method :: FTP.retrlines(cmd, callback=None)
@@ -232,16 +245,33 @@ FTP objects
232245
233246 .. method :: FTP.storbinary(cmd, fp, blocksize=8192, callback=None, rest=None)
234247
235- Store a file in binary transfer mode. *cmd * should be an appropriate
236- ``STOR `` command: ``"STOR filename" ``. *fp * is a :term: `file object `
237- (opened in binary mode) which is read until EOF using its :meth: `~io.IOBase.read `
238- method in blocks of size *blocksize * to provide the data to be stored.
239- The *blocksize * argument defaults to 8192. *callback * is an optional single
240- parameter callable that is called on each block of data after it is sent.
241- *rest * means the same thing as in the :meth: `transfercmd ` method.
248+ Store a file in binary transfer mode.
249+
250+ :param str cmd:
251+ An appropriate ``STOR `` command: :samp: `"STOR { filename } " `.
252+
253+ :param fp:
254+ A file object (opened in binary mode) which is read until EOF,
255+ using its :meth: `~io.RawIOBase.read ` method in blocks of size *blocksize *
256+ to provide the data to be stored.
257+ :type fp: :term: `file object `
258+
259+ :param int blocksize:
260+ The read block size.
261+ Defaults to ``8192 ``.
262+
263+ :param callback:
264+ A single parameter callable that is called
265+ for each block of data sent,
266+ with its single argument being the data as :class: `bytes `.
267+ :type callback: :term: `callable `
268+
269+ :param int rest:
270+ A ``REST `` command to be sent to the server.
271+ See the documentation for the *rest * parameter of the :meth: `transfercmd ` method.
242272
243273 .. versionchanged :: 3.2
244- *rest * parameter added.
274+ The *rest * parameter was added.
245275
246276
247277 .. method :: FTP.storlines(cmd, fp, callback=None)
0 commit comments