termux-api icon indicating copy to clipboard operation
termux-api copied to clipboard

Expose last-modified times

Open BryanJacobs opened this issue 1 year ago • 0 comments

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
  },

BryanJacobs avatar Mar 28 '24 02:03 BryanJacobs