code: def download(self, remote, writer):
          
  
          fd = self.open(remote)
          while True:
              chunk = self.read(fd)
              if chunk == b'':
                  break
              writer.write(chunk)
          self.close(fd)
docs: Downloads a file
          :param remote: remote file name
          :param writer: an object the implements the write(bytes) interface (typical a file descriptor)
          :return: