# File lib/sup/maildir.rb, line 18
  def initialize uri, last_date=nil, usual=true, archived=false, id=nil, labels=[], mtimes={}
    super uri, last_date, usual, archived, id
    uri = URI(Source.expand_filesystem_uri(uri))

    raise ArgumentError, "not a maildir URI" unless uri.scheme == "maildir"
    raise ArgumentError, "maildir URI cannot have a host: #{uri.host}" if uri.host
    raise ArgumentError, "maildir URI must have a path component" unless uri.path

    @dir = uri.path
    @labels = Set.new(labels || [])
    @ids = []
    @ids_to_fns = {}
    @last_scan = nil
    @mutex = Mutex.new
    #the mtime from the subdirs in the maildir with the unix epoch as default.
    #these are used to determine whether scanning the directory for new mail
    #is a worthwhile effort
    @mtimes = { 'cur' => Time.at(0), 'new' => Time.at(0) }.merge(mtimes || {})
    @dir_ids = { 'cur' => [], 'new' => [] }
  end