Device File Management

List files in a directory on the device

Returns a list of files and directories at the specified path on the device storage.

post/sessions/{sessionId}/device/listFiles

Request

Path parameters

sessionIdstring required

The id of the device session

Request body

pathstring required

The path to the directory to list files from.

bundleIdstring

The iOS app bundle identifier (e.g., com.example.app). Required for iOS devices, not needed for Android. On iOS, each app runs in its own sandbox — an isolated file system container that restricts access to only that app's data. This means you must specify which app's sandbox to operate on by providing its bundle ID. You can find the bundle ID in Xcode, in the app's Info.plist, or via the Sauce Labs app management API. See Apple's File System documentation for more details.

Example request

{
  "path": "/Download/",
  "bundleId": "com.example.app"
}

Response

List of files retrieved successfully

string[] required

Example response

[
  "/Download/file.txt"
]

Changes

No recorded changes to this operation across all 1 revision of this API.