Logo Search packages:      
Sourcecode: s3ql version File versions  Download package

def s3ql::backends::boto::s3::key::Key::get_contents_to_file (   self,
  fp,
  headers = None,
  cb = None,
  num_cb = 10,
  torrent = False,
  version_id = None 
)
Retrieve an object from S3 using the name of the Key object as the
key in S3.  Write the contents of the object to the file pointed
to by 'fp'.

:type fp: File -like object
:param fp:

:type headers: dict
:param headers: additional HTTP headers that will be sent with the GET request.

:type cb: function
:param cb: (optional) a callback function that will be called to report
     progress on the download.  The callback should accept two integer
     parameters, the first representing the number of bytes that have
     been successfully transmitted from S3 and the second representing
     the total number of bytes that need to be transmitted.
     
    
:type cb: int
:param num_cb: (optional) If a callback is specified with the cb parameter
     this parameter determines the granularity of the callback by defining
     the maximum number of times the callback will be called during the file transfer.  
     
:type torrent: bool
:param torrent: If True, returns the contents of a torrent file as a string.

Definition at line 740 of file key.py.

                                             :
        """
        Retrieve an object from S3 using the name of the Key object as the
        key in S3.  Write the contents of the object to the file pointed
        to by 'fp'.
        
        :type fp: File -like object
        :param fp:
        
        :type headers: dict
        :param headers: additional HTTP headers that will be sent with the GET request.
        
        :type cb: function
        :param cb: (optional) a callback function that will be called to report
             progress on the download.  The callback should accept two integer
             parameters, the first representing the number of bytes that have
             been successfully transmitted from S3 and the second representing
             the total number of bytes that need to be transmitted.
             
                    
        :type cb: int
        :param num_cb: (optional) If a callback is specified with the cb parameter
             this parameter determines the granularity of the callback by defining
             the maximum number of times the callback will be called during the file transfer.  
             
        :type torrent: bool
        :param torrent: If True, returns the contents of a torrent file as a string.

        """
        if self.bucket != None:
            self.get_file(fp, headers, cb, num_cb, torrent=torrent,
                          version_id=version_id)


Generated by  Doxygen 1.6.0   Back to index