Method: Appium::Core::Base::Driver#pull_folder

Defined in:
lib/appium_lib_core/common/base/driver.rb

#pull_folder(path) ⇒ Base64-decoded

Pull a folder content from the remote device. On Android the application under test should be built with debuggable flag enabled in order to get access to its container on the internal file system.

Examples:


decoded_file = @driver.pull_folder '/data/local/tmp' #=> Get the folder at that path
decoded_file = @driver.pull_file '@com.appium.example/Documents' #=> Get 'Documents' in @com.appium.example
File.open('proper_filename', 'wb') { |f| f<< decoded_file }

Parameters:

  • path (String)

    Absolute path to the folder. If the path starts with @applicationId/ prefix, then the folder will be pulled from the root of the corresponding application container. Otherwise the root folder is considered as / on Android and on iOS it is a media folder root (real devices only). Only pulling files from application containers is supported for iOS Simulator. Provide the remote path in format @bundle.identifier:container_type/relative_path_in_container

Returns:

  • (Base64-decoded)

    Base64 decoded data which is zip archived



523
524
525
526
# File 'lib/appium_lib_core/common/base/driver.rb', line 523

def pull_folder(path)
  # TODO: use 'mobile: pullFolder' internally
  @bridge.pull_folder(path)
end