# File lib/mechanize/file_response.rb, line 9 def read_body raise Mechanize::ResponseCodeError, self unless File.exist? @file_path if directory? yield dir_body else open @file_path, 'rb' do |io| yield io.read end end end