def retrieve_file(self, remote_full_path, local_full_path_or_buffer):
conn = self.get_conn()
is_path = isinstance(local_full_path_or_buffer, basestring)
if is_path:
output_handle = open(local_full_path_or_buffer, 'wb')
else:
output_handle = local_full_path_or_buffer
logging.info('Retrieving file from FTP: {}'.format(remote_full_path))
conn.getfo(remote_full_path, output_handle)
logging.info('Finished retrieving file from FTP: {}'.format(
remote_full_path))
if is_path:
output_handle.close()
file_transfer_plugin.py 文件源码
python
阅读 16
收藏 0
点赞 0
评论 0
评论列表
文章目录