code: def download_file(self, remoteFileName, localFilePath=None, connId='default'):
          
          thisConn = self.__getConnection(connId)
          outputMsg = ""
          localPath = ""
          if localFilePath == None:
              localPath = remoteFileName
          else:
              localPath = os.path.normpath(localFilePath)
              if os.path.isdir(localPath):
                  localPath = os.path.join(localPath, remoteFileName)
          try:
              with open(localPath, 'wb') as localFile:
                  outputMsg += thisConn.retrbinary("RETR " + remoteFileName, localFile.write)
          except ftplib.all_errors as e:
              raise FtpLibraryError(str(e))
          if self.printOutput:
              logger.info(outputMsg)
          return outputMsg
docs: Downloads file from current directory on FTP server in binary mode. If
          localFilePath is not given, file is saved in current local directory (by
          default folder containing robot framework project file) with the same name
          as source file. Returns server output
          Parameters:
          - remoteFileName - file name on FTP server
          - localFilePath (optional) - local file name or path where remote file should be saved.
          - connId(optional) - connection identifier. By default equals 'default'
          localFilePath variable can have following meanings:
          1. file name (will be saved in current default directory);
          2. full path (dir + file name)
          3. dir path (original file name will be added)
          Examples:
          | download file | a.txt |  |  |
          | download file | a.txt | b.txt | connId=ftp1 |
          | download file | a.txt | D:/rfftppy/tmp |  |
          | download file | a.txt | D:/rfftppy/tmp/b.txt |  |
          | download file | a.txt | D:\\rfftppy\\tmp\\c.txt |  |