# File lib/sup/mbox/ssh-loader.rb, line 12
  def initialize uri, username=nil, password=nil, start_offset=nil, usual=true, archived=false, id=nil, labels=[]
    raise ArgumentError, "not an mbox+ssh uri: #{uri.inspect}" unless uri =~ %r!^mbox\+ssh://!

    super uri, start_offset, usual, archived, id

    @parsed_uri = URI(uri)
    @username = username
    @password = password
    @uri = uri
    @cur_offset = start_offset
    @labels = (labels || []).freeze

    opts = {}
    opts[:username] = @username if @username
    opts[:password] = @password if @password
    
    @f = SSHFile.new host, filename, opts
    @loader = Loader.new @f, start_offset, usual, archived, id
    
    ## heuristic: use the filename as a label, unless the file
    ## has a path that probably represents an inbox.
  end