开发者

Moving files with adb push

开发者 https://www.devze.com 2023-03-23 17:40 出处:网络
When copying a hierarchy of folders over with adb push what order will the files and folders be copied over to the device?

When copying a hierarchy of folders over with adb push what order will the files and folders be copied over to the device? For example will it create all the folders then move the files over in alphabetical order or is it random or does it move based on size.

Example hierarchy ~/media has 2 folders ~/media/audio and ~/media/images and those folders have albums and archives of pictures respectively

If I use th开发者_C百科e command

adb push ~/media/ /sdcard/media_from_desktop/

What order will the files/folders be copied in? I know I can just view the output and see what the order is for this example but I am looking for the rules that will apply to every adb push transfer.


adb's local_build_list() utilizes the host c library readdir() function.

See https://android.googlesource.com/platform/system/core/+/froyo-release/adb/file_sync_client.c

man 3 readdir does not seem to say anything about the order in which the directory entries will be returned, it may well depend on the internals of the host file system.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号