adafruit / Adafruit_CircuitPython_BLE_File_Transfer

Simple (not fast) File Transfer service for BLE
MIT License
27 stars 4 forks source link

Add file modification time. #10

Closed tannewt closed 3 years ago

tannewt commented 3 years ago

This is a bit tricky because FATFS stores at 2 second resolution after 1980. Ideally this API would be file system agnostic but we'd need a way to convey the modification time resolution since it can vary.

Either we can return the modified time after a write or rely on a following listdir to get it. We could incorporate this into a broader file system info command that could provide the resolution available in nanoseconds.

I think the ideal would be nanoseconds after Jan 1, 1970. This is what MicroPython uses for littlefs and we may switch to littlefs for BLE-only boards.