# File lib/net/ftp.rb, line 490
    def getbinaryfile(remotefile, localfile = File.basename(remotefile),
                      blocksize = DEFAULT_BLOCKSIZE, &block) # :yield: data
      if @resume
        rest_offset = File.size?(localfile)
        f = open(localfile, "a")
      else
        rest_offset = nil
        f = open(localfile, "w")
      end
      begin
        f.binmode
        retrbinary("RETR " + remotefile, blocksize, rest_offset) do |data|
          f.write(data)
          yield(data) if block
        end
      ensure
        f.close
      end
    end