termux-api
termux-api copied to clipboard
Expose last-modified times
This exposes the last modified times of files, where available, to commands like termux-saf-ls and termux-saf-stat.
I wrote https://github.com/BryanJacobs/saf_sync/ but it's badly hampered by not being able to see file modification times. Exposing this already-available information would avoid unnecessary copies.
Example output when testing with a real Termux on an actual Android device:
{
"name": "myfile.bin",
"type": "application/octet-stream",
"uri": "content://com.android.externalstorage.documents/tree/primary%3Atest/document/primary%3Atest%2Fmyfile.bin",
"length": 384,
"last_modified": 2126636192
},