Skip to content

Commit afc3878

Browse files
authored
appended docstring for file management (#93)
1 parent 2f53204 commit afc3878

File tree

1 file changed

+45
-4
lines changed

1 file changed

+45
-4
lines changed

lib/appium_lib_core/device.rb

+45-4
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,21 @@ module Device
277277

278278
# @!method push_file(path, filedata)
279279
# Place a file in a specific location on the device.
280+
# On iOS, the server should have ifuse libraries installed and configured properly for this feature to work on real devices.
281+
# On Android, the application under test should be built with debuggable flag enabled in order to get access to
282+
# its container on the internal file system.
283+
#
284+
# @see https://github.com/libimobiledevice/ifuse iFuse GitHub page6
285+
# @see https://github.com/osxfuse/osxfuse/wiki/FAQ osxFuse FAQ
286+
# @see https://developer.android.com/studio/debug/ 'Debug Your App' developer article
287+
#
280288
# @param [String] path The absolute path on the device to store data at.
289+
# If the path starts with application id prefix, then the file will be pushed to
290+
# the root of the corresponding application container.
291+
292+
# @param [String] path Either an absolute path OR, for iOS devices, a path relative to the app, as described.
293+
# If the path starts with application id prefix, then the file will be pushed to the root of
294+
# the corresponding application container.
281295
# @param [String] filedata Raw file data to be sent to the device. Converted to base64 in the method.
282296
#
283297
# @example
@@ -286,9 +300,22 @@ module Device
286300
#
287301

288302
# @!method pull_file(path)
289-
# Retrieve a file from the device. This can retrieve an absolute path or
290-
# a path relative to the installed app (iOS only).
303+
# Pull a file from the simulator/device.
304+
# On iOS the server should have ifuse
305+
# libraries installed and configured properly for this feature to work on real devices.
306+
# On Android the application under test should be built with debuggable flag enabled in order to get access
307+
# to its container on the internal file system.
308+
#
309+
# @see https://github.com/libimobiledevice/ifuse iFuse GitHub page6
310+
# @see https://github.com/osxfuse/osxfuse/wiki/FAQ osxFuse FAQ
311+
# @see https://developer.android.com/studio/debug/ 'Debug Your App' developer article
312+
#
291313
# @param [String] path Either an absolute path OR, for iOS devices, a path relative to the app, as described.
314+
# If the path starts with application id prefix, then the file will be pulled from the root
315+
# of the corresponding application container.
316+
# Otherwise the root folder is considered as / on Android and on iOS it is a media folder root
317+
# (real devices only).
318+
# @return [Base64-decoded] Base64 decoded data
292319
#
293320
# @example
294321
#
@@ -297,8 +324,22 @@ module Device
297324
#
298325

299326
# @!method pull_folder(path)
300-
# Retrieve a folder from the device.
301-
# @param [String] path absolute path to the folder
327+
# Pull a folder content from the simulator/device.
328+
# On iOS the server should have ifuse libraries installed and configured properly for this feature to work on real devices.
329+
# On Android the application under test should be built with debuggable flag enabled in order to get access to its container
330+
# on the internal file system.
331+
#
332+
# @see https://github.com/libimobiledevice/ifuse iFuse GitHub page6
333+
# @see https://github.com/osxfuse/osxfuse/wiki/FAQ osxFuse FAQ
334+
# @see https://developer.android.com/studio/debug/ 'Debug Your App' developer article
335+
#
336+
# @param [String] path Absolute path to the folder.
337+
# If the path starts with <em>@applicationId/</em> prefix, then the folder will be pulled
338+
# from the root of the corresponding application container.
339+
# Otherwise the root folder is considered as / on Android and on iOS it is a media folder root
340+
# (real devices only).
341+
#
342+
# @return [Base64-decoded] Base64 decoded data which is zip archived
302343
#
303344
# @example
304345
#

0 commit comments

Comments
 (0)