Method: Selenium::WebDriver::Zipper.zip_file

Defined in:
lib/selenium/webdriver/common/zipper.rb

.zip_file(path) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


63
64
65
66
67
68
69
70
# File 'lib/selenium/webdriver/common/zipper.rb', line 63

def zip_file(path)
  with_tmp_zip do |zip|
    add_zip_entry zip, path, File.basename(path)

    zip.commit
    File.open(zip.name, 'rb') { |io| Base64.strict_encode64 io.read }
  end
end