pushFile

suspend fun pushFile(devicePath: String, bytes: ByteArray)(source)

Copies bytes to devicePath on the device (absolute and normalised, at most 512 MiB): /data/local/tmp/…, or shared storage (/sdcard/Download/…) for an app with storage access to read. The directory must exist. A file already there is refused (FailureReason.DEVICE_FILE) unless this device handle pushed it, so a test never overwrites the device's own files; the size is read back. The file is deleted on detach.


suspend fun pushFile(devicePath: String, source: Path)(source)

pushFile with the bytes of the local file source, streamed.