# File lib/rack/utils.rb, line 446 446: def initialize(path, content_type = "text/plain", binary = false) 447: raise "#{path} file does not exist" unless ::File.exist?(path) 448: @content_type = content_type 449: @original_filename = ::File.basename(path) 450: @tempfile = Tempfile.new(@original_filename) 451: @tempfile.set_encoding(Encoding::BINARY) if @tempfile.respond_to?(:set_encoding) 452: @tempfile.binmode if binary 453: FileUtils.copy_file(path, @tempfile.path) 454: end