instance method next_file_name

Ruby on Rails 2.3.18

Since v2.2.3 Last seen in v2.3.18 Private

Available in: v2.2.3 v2.3.18

Signature

next_file_name()

No documentation comment.

Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/mailbox.rb, line 127
    def next_file_name
      unless n = @last_file
        n = 0
        Dir.entries(@dirname)\
                .select {|s| /\A\d+\z/ === s }\
                .map {|s| s.to_i }.sort\
        .each do |i|
          next unless FileTest.file? "#{@dirname}/#{i}"
          n = i
        end
      end
      begin
        n += 1
      end while FileTest.exist? "#{@dirname}/#{n}"
      @last_file = n

      "#{@dirname}/#{n}"
    end

Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/mailbox.rb line 127 · View on GitHub · Improve this page · Find usages on GitHub

Defined in TMail::MhMailbox

Type at least 2 characters to search.

↑↓ navigate · open · esc close