Module: Appium::Core::Base::Device::FileManagement

Included in:
Bridge::MJSONWP, Bridge::W3C
Defined in:
lib/appium_lib_core/common/device/file_management.rb

Instance Method Summary collapse

Instance Method Details

#pull_file(path) ⇒ Object



13
14
15
16
# File 'lib/appium_lib_core/common/device/file_management.rb', line 13

def pull_file(path)
  data = execute :pull_file, {}, path: path
  Base64.decode64 data
end

#pull_folder(path) ⇒ Object



18
19
20
21
# File 'lib/appium_lib_core/common/device/file_management.rb', line 18

def pull_folder(path)
  data = execute :pull_folder, {}, path: path
  Base64.decode64 data
end

#push_file(path, filedata) ⇒ Object



8
9
10
11
# File 'lib/appium_lib_core/common/device/file_management.rb', line 8

def push_file(path, filedata)
  encoded_data = Base64.encode64 filedata
  execute :push_file, {}, path: path, data: encoded_data
end