jb2170 / better-adb-sync

Completely rewritten adbsync with --exclude
Apache License 2.0
363 stars 23 forks source link

[Question] Preserving file timestamps? #2

Closed yNEX closed 2 years ago

yNEX commented 3 years ago

Does the script consider timestamps of the files transfered? Meaning last time modified and creation time? Comparing to the original adb-sync there's no option for this (-t)

jb2170 commented 3 years ago

Yes, this is on by default / is not a CLI option. After a file is pushed across its modified and created times are set. This has minute-resolution accuracy as that is what ls -l gives us over adb shell.

(line 131-132)

# push the file at tree_root to destination_root
self.pushFileHere(tree_root, destination_root)

# set the times of the file at destination_root to tree (which is the tuple of times)
self.utime(destination_root, tree)
roberto-sartori-gl commented 10 months ago

@jb2170 just a question about this, without opening a new issue. I see that the files timestamps are preserved, but this is not the case with directories. Can you confirm this? Thanks!